other binary representations of a Float64

julia> exp1_inStdHexFormat = @sprintf("%a",exp(1.0))
"0x1.5bf0a8b145769p+1"

julia> parse(Float64,exp1_inStdHexFormat)
2.718281828459045

and from my satchel

exp1_as_float = exp(1.0)
2.718281828459045

exp1_as_unsigned = reinterpret(Uint64, exp1_as_float)
0x4005bf0a8b145769

exp1 = reinterpret(Float64, exp1_as_unsigned)
2.718281828459045





On Saturday, October 17, 2015 at 12:27:23 PM UTC-4, Marcus Appelros wrote:
>
> Also possible with the bits function:
> julia> bits(1.0)
> "0011111111110000000000000000000000000000000000000000000000000000"
>

Reply via email to