You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The f64 obtained from transmuting 0x7ff0_0000_0000_0001u64 is NaN, as it has all exponent bits set and has one bit set in the mantissa. The current conversion function from f64 always discards the least significant 32 bits, so it converts this into infinity instead of NaN.
Also, for both the f32 and f64 conversion functions, the sign of a converted NaN is independent of the source, unlike the primitive conversions where the sign bit is retained when converting say from an f64 NaN to an f32.
The text was updated successfully, but these errors were encountered:
The
f64
obtained from transmuting0x7ff0_0000_0000_0001u64
is NaN, as it has all exponent bits set and has one bit set in the mantissa. The current conversion function fromf64
always discards the least significant 32 bits, so it converts this into infinity instead of NaN.Also, for both the
f32
andf64
conversion functions, the sign of a converted NaN is independent of the source, unlike the primitive conversions where the sign bit is retained when converting say from anf64
NaN to anf32
.The text was updated successfully, but these errors were encountered: