1e24 is actually outside the range of values for which every integer can be exactly represented as an IEEE double-precision floating point number (i.e. a Julia Float64). So even if you write 1e24, you will actually get the closest Float64, which turns out to be slightly less than 1e24:
julia> using Printf
julia> @printf("%.17g", 1e24)
9.9999999999999998e+23
If you need higher-precision arithmetic on such large numbers, you could use a BigFloat:
Ohh thanks i got it, how stupid from me. The value is stored as an (52bit) *2^(11bit) number and not as an (52bit)*10^(11bit). I never had the chance to learn the basics…
Yes, I can confirm that I get the same results as JeffreySarnoff.
@tbeason & @Tamas_Papp I’m not sure I understood your messages: do you get the same behaviour as MatFi or as JeffreySarnoff?
This looks like a bug to me, but I don’t know where it could come from… I might be wrong, but to me it does not seem related to the issue mentioned by Tamas above.
Thanks, this definitely confirms that there is a problem somewhere. FWIW, the system on which I observe the same results as JeffreySarnoff is a Linux box.