3 ms·
The easiest way to see this exact value in Julia is to convert the Float64 value 0.1 to BigFloat and then print that: julia> big(0.1) 1.000000000000000
by StefanKarpinski 13y ago
The easiest way to see this exact value in Julia is to convert the Float64 value 0.1 to BigFloat and then print that:
julia> big(0.1)
1.000000000000000055511151231257827021181583404541015625e-01
julia> big(1e50)
1.0000000000000000762976984109188700329496497094656e+50
Note that this is exactly why you don't normally want to construct BigFloats this way. Instead you want to do this:
julia> BigFloat("0.1")
1.000000000000000000000000000000000000000000000000000000000000000000000000000002e-01
julia> BigFloat("1e50")
1e+50