Opened 6 years ago

Closed 6 years ago

#19916 closed enhancement (fixed)

Add arb algorithm for Bernoulli numbers

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-7.1
Component: number theory Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: f5ed314 (Commits, GitHub, GitLab) Commit: f5ed31434702faaf025bbde584fdd7fec28f66dd
Dependencies: Stopgaps:

Status badges

Description


Change History (7)

comment:1 Changed 6 years ago by jdemeyer

  • Branch set to u/jdemeyer/add_arb_algorithm_for_bernoulli_numbers

comment:2 Changed 6 years ago by jdemeyer

  • Commit set to f5ed31434702faaf025bbde584fdd7fec28f66dd
  • Status changed from new to needs_review

New commits:

f5ed314Add arb algorithm for Bernoulli numbers

comment:3 follow-up: Changed 6 years ago by vdelecroix

  • Reviewers set to Vincent Delecroix
  • Status changed from needs_review to positive_review

Arb seems slower than everything... though it does not hurt to have one more algorithm. Note that arb can cache the results internally (intended to be used for evaluation of special functions).

comment:4 in reply to: ↑ 3 Changed 6 years ago by jdemeyer

Replying to vdelecroix:

Arb seems slower than everything...

Really? I also did some crude benchmarks and arb seems pretty close to flint, certainly faster than pari or bernmm. I will do some finer benchmarks later today. And we should probably get rid of the bernmm algorithm since we have 3 faster implementations in Sage now.

comment:5 Changed 6 years ago by fredrik.johansson

I got these timings calling the C libraries directly. The differences are insignificant.

n            arb         flint       pari
100          5.19e-06    4.91e-06    6.65e-06
1000         0.00017     0.000182    0.000234
10000        0.0217      0.0218      0.0325
100000       4.931       5.848       5.706
1000000      547.378     574.585     623.222

comment:6 Changed 6 years ago by fredrik.johansson

bernmm is faster for n > 105, approximately (it takes 4.96 s for n = 105, and 279 s for n = 106).

comment:7 Changed 6 years ago by vbraun

  • Branch changed from u/jdemeyer/add_arb_algorithm_for_bernoulli_numbers to f5ed31434702faaf025bbde584fdd7fec28f66dd
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.