4 ms·
The problem isn't the type, it's the bits. If you convert from Float64, you'll get garbage bits once you go past the bits determined by float64: julia> Big
by eigenspace 3y ago
The problem isn't the type, it's the bits. If you convert from Float64, you'll get garbage bits once you go past the bits determined by float64:
julia> BigFloat(1.1)
1.100000000000000088817841970012523233890533447265625
I'd recommend using the big string macro though isntead of converting explictly from a string:
julia> big"1.1"
1.100000000000000000000000000000000000000000000000000000000000000000000000000003
- leephillips 3y agoOh, I see. Thank you. (And, in Julia’s defense, this is all spelled out in the documentation, immediately accessible from the REPL. I just never read it carefully enough.)
- kloch 3y ago> And, in Julia’s defense, this is all spelled out in the documentation, immediately accessible from the REPL. I just never read it carefully enough. My concern is most physicists won't read that either and may not even notice the loss of precision until it's too late (after a paper has been published).