about summary refs log tree commit diff
path: root/src/libstd/f32.rs
AgeCommit message (Collapse)AuthorLines
2017-08-26Add clamp functionsJacob Kiesel-0/+20
2017-07-18float_bits_conv made it into 1.20est31-2/+2
2017-07-06Stabilize float_bits_convest31-4/+2
2017-07-03Make sNaN removal code tolerate different sNaN encodingsest31-8/+16
IEEE 754-1985 specifies the encoding of NaN floating point numbers, but while it mentions that NaNs can be subdivided into signaling and quiet ones, it doesn't fix the encoding of signaling NaNs in binary formats. This led to different implementations (CPUs) having different encodings. IEEE 754-2008 finally specified the encoding of signaling NaNs but some architectures are compatible with it, while others aren't. Certain MIPS and PA-RISC CPUs have different encodings for signaling NaNs. In order to have the float <-> binary cast feature of the std library be portable to them, we don't mask any quiet NaNs like we did before (only being compliant to IEEE 754-2008 and nothing else), but instead we simply pass a known good NaN instead. Note that in the code removed there was a bug; the 64 bit mask for quiet NaNs should have been `0x0008000000000000` instead of the specified `0x0001000000000000`.
2017-06-28Auto merge of #42431 - nagisa:core-float-2, r=alexcrichtonbors-16/+8
Fix NaN handling in is_sign_negative/positive This would be my proposed fix for the #42425 provided we decide it is indeed a problem. Note this would technically be a breaking change to a stable API. We might want to consider deprecating these methods and adding new ones.
2017-06-22Fix NaN handling in is_sign_negative/positiveSimonas Kazlauskas-16/+8
See #42425
2017-06-14Re-implement float min/max in rustSimonas Kazlauskas-4/+2
See #42423
2017-04-22Remove unused import.Corey Farwell-1/+1
2017-04-20Remove float_extrasJosh Stone-204/+0
[unstable, deprecated since 1.11.0]
2017-04-18Allow us to remove masking in the futureest31-2/+2
2017-04-18Preserve sNaN payload when converting them to quiet NaNsest31-7/+25
2017-04-18Convert sNaN to quiet NaN instead of returning errorsest31-12/+18
2017-04-18assert_ne and tracking issueest31-3/+3
2017-04-18Add examples headingest31-0/+4
2017-04-18Return Err(()) when trying to convert sNaN representation to floatest31-7/+17
2017-04-18Add functions to safely transmute float to intest31-0/+51
2017-04-11Improve module description for std::f32 and std::f64.Paul Lange-1/+3
Fixes #29353
2017-02-21Get linkchecker cleanSteve Klabnik-1/+1
This affects the book, some missed things in the reference, the grammar, and the standard library. Whew!
2016-11-01std: Flatten the num directory to reflect the module layoutBrian Anderson-0/+1871
This makes it dissimilar to how core is structured on disk, but more predictable on its own.