Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full argument reduction for the elliptic integrals #2368

Merged
merged 11 commits into from
Nov 3, 2019

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Nov 3, 2019

Amusingly, I think that this uncovered a bug in Mathematica 11.0. You'd expect EllipticPi[3/2, N[3 Pi,200], 9/10] and N[EllipticPi[3/2, 3 Pi, 9/10], 200] to return roughly the same value, but they don't. I believe that the latter is correct.

Benchmarks before:

---------------------------------------------------------------
Benchmark                        Time           CPU Iterations
---------------------------------------------------------------
BM_EllipticF                   168 ns        168 ns   16619200
BM_EllipticFE?                 271 ns        267 ns    9976000
BM_FukushimaEllipticBDJ        270 ns        269 ns   10560000
BM_JacobiAmplitude             206 ns        206 ns   13810000
BM_JacobiSNCNDN                138 ns        138 ns   20640000

after:

---------------------------------------------------------------
Benchmark                        Time           CPU Iterations
---------------------------------------------------------------
BM_EllipticF                   162 ns        163 ns   17258400
BM_EllipticFE?                 274 ns        273 ns   10560000
BM_FukushimaEllipticBDJ        266 ns        266 ns    9976000
BM_JacobiAmplitude             206 ns        204 ns   13810000
BM_JacobiSNCNDN                142 ns        140 ns   20170000

numerics/elliptic_integrals.cpp Show resolved Hide resolved
@eggrobin eggrobin added the LGTM label Nov 3, 2019
@pleroy pleroy merged commit 72bda44 into mockingbirdnest:master Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants