summary refs log tree commit diff
path: root/src/libstd/f64.rs
AgeCommit message (Collapse)AuthorLines
2017-11-08std: Move the `cmath` module into the `sys` moduleAlex Crichton-47/+2
This commit moves the `f32::cmath` and `f64::cmath` modules into the `sys` module. Note that these are not publicly exported modules, simply implementation details. These modules are already platform-specific with shims on MSVC and this is mostly just a reflection of that reality. This should also help cut down on `#[cfg]` traffic if platforms are brought on which don't directly support these functions.
2017-09-08Revert "Add clamp functions"Jacob Kiesel-20/+0
This reverts commit c589f867f89d4e6e48c6602aed8e878208d4822f.
2017-09-08Revert "Add NAN examples"Jacob Kiesel-1/+0
This reverts commit f74c5d2e18e50c24de2cc1192bf2088cdaa61916.
2017-09-08Revert "Fix f64 examples"Jacob Kiesel-4/+2
This reverts commit 576426a05a1a6cb33eece7082d7341b7c6bb5277.
2017-09-08Revert "Fix documentation and formatting."Jacob Kiesel-4/+1
This reverts commit 2e34ff767113c6a15c5862b0646ca9ad7ffd81b1.
2017-09-08Revert "Add panic unit tests"Jacob Kiesel-18/+0
This reverts commit b762283e57ff71f6763effb9cfc7fc0c7967b6b0.
2017-09-04Add panic unit testsJacob Kiesel-0/+18
2017-09-01Fix documentation and formatting.Jacob Kiesel-1/+4
2017-08-26Fix f64 examplesJacob Kiesel-2/+4
2017-08-26Add NAN examplesJacob Kiesel-0/+1
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-5/+8
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-18/+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-18/+8
See #42425
2017-06-16Auto merge of #42430 - nagisa:core-float, r=alexcrichtonbors-4/+2
Re-implement float min/max in rust This also adds the relevant implementations into libcore. See #42423
2017-06-14Re-implement float min/max in rustSimonas Kazlauskas-4/+2
See #42423
2017-06-13Ignore some failing test on wasm32-unknown-emscriptenMarco A L Barbosa-0/+3
See #42629 and #42630.
2017-04-20Remove float_extrasJosh Stone-179/+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/+10
2017-04-18Convert sNaN to quiet NaN instead of returning errorsest31-12/+18
2017-04-18assert_ne and tracking issueest31-2/+2
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/+1756
This makes it dissimilar to how core is structured on disk, but more predictable on its own.