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

Utilize precompilable bigints in their fullest of glory #14

Merged
merged 2 commits into from Aug 20, 2018

Conversation

ChrisRackauckas
Copy link
Member

@StefanKarpinski
Copy link

I don’t think you need the BigInt constructor calls since these values are too big for native integer types.

@ChrisRackauckas
Copy link
Member Author

Not all of them. There are some expressions in there that will overflow if you don't make them bigfloats since the numbers are smaller than bigfloat but the rational numbers you get would require bigfloat. I think lines like this are it:

https://github.com/JuliaDiffEq/DiffEqDevTools.jl/pull/14/files#diff-c23f684630d78ba4c89b132bc1ec4157R4870

@StefanKarpinski
Copy link

I mean that BigInt(123... lots of digits ... 789) is redundant since with that many digits the integer is already parsed as a BigInt.

@ChrisRackauckas
Copy link
Member Author

Yes, in those cases. But not every case is like that. In some cases you get Rational{Int128} + Rational{Int64} and the result overflows, and I think the line I linked is one of them. Way back when I wrote this I kept upconverting everything I could to parse(BigInt,"") until that issue was gone. Now I just throw a find/replace on all of the parse statements, but to avoid this issue I put BigInt($1). So it's not needed in all cases but it is in some, and where it isn't needed it's harmless so I'll go make it cleaner later haha.

@codecov
Copy link

codecov bot commented Aug 18, 2018

Codecov Report

Merging #14 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #14   +/-   ##
=======================================
  Coverage   99.39%   99.39%           
=======================================
  Files           6        6           
  Lines        6800     6800           
=======================================
  Hits         6759     6759           
  Misses         41       41
Impacted Files Coverage Δ
src/ode_tableaus.jl 100% <ø> (ø) ⬆️
src/convergence.jl 84.61% <0%> (ø) ⬆️
src/benchmark.jl 72.54% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 691c386...295cfdf. Read the comment docs.

@ChrisRackauckas ChrisRackauckas merged commit 0ee8720 into master Aug 20, 2018
@ChrisRackauckas ChrisRackauckas deleted the bigint branch August 20, 2018 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants