Commit Graph

21 Commits

Author SHA1 Message Date
Ali Malik
e43254aad1 Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
cyberia
a853a49425 Clarify behaviour of f64 and f32::sqrt when argument is negative zero 2021-07-07 18:22:17 +01:00
ltdk
525d76026f Change tracking issue 2021-06-13 14:04:43 -04:00
ltdk
d8e247e38c More lerp tests, altering lerp docs 2021-06-13 14:00:15 -04:00
ltdk
f310d0e500 Add lerp method 2021-06-01 23:09:46 -04:00
Trevor Spiteri
dd502cb343 doc: cube root, not cubic root
Like we say square root, not quadratic root.
2021-02-26 19:03:44 +01:00
bstrie
6f3df00610 Deprecate-in-future the constants superceded by RFC 2700 2021-01-20 20:08:11 -05:00
bors
c1d5843661 Auto merge of #79473 - m-ou-se:clamp-in-core, r=m-ou-se
Move {f32,f64}::clamp to core.

`clamp` was recently stabilized (tracking issue: https://github.com/rust-lang/rust/issues/44095). But although `Ord::clamp` was added in `core` (because `Ord` is in `core`), the versions for the `f32` and `f64` primitives were added in `std` (together with `floor`, `sin`, etc.), not in `core` (together with `min`, `max`, `from_bits`, etc.).

This change moves them to `core`, such that `clamp` on floats is available in `no_std` programs as well.
2020-12-19 21:57:38 +00:00
Tyler Mandry
1b4ffe4705
Rollup merge of #77027 - termhn:mul_add_doc_change, r=m-ou-se
Improve documentation for `std::{f32,f64}::mul_add`

Makes it more clear that performance improvement is not guaranteed when using FMA, even when the target architecture supports it natively.
2020-12-10 21:32:59 -08:00
Mara Bos
0523eeb8a3 Move {f32,f64}::clamp to core. 2020-11-27 19:15:51 +01:00
bors
5d5ff84130 Auto merge of #77872 - Xaeroxe:stabilize-clamp, r=scottmcm
Stabilize clamp

Tracking issue: https://github.com/rust-lang/rust/issues/44095

Clamp has been merged and unstable for about a year and a half now. How do we feel about stabilizing this?
2020-11-22 10:50:04 +00:00
Jacob Kiesel
fb6ceac46b We missed 1.49.0, so bump version to 1.50.0 2020-11-20 10:37:22 -07:00
Mara Bos
4ebd5536b4
Rollup merge of #77099 - tspiteri:exp_m1-examples, r=m-ou-se
make exp_m1 and ln_1p examples more representative of use

With this PR, the examples for `exp_m1` would fail if `x.exp() - 1.0` is used instead of `x.exp_m1()`, and the examples for `ln_1p` would fail if `(x + 1.0).ln()` is used instead of `x.ln_1p()`.
2020-10-31 09:49:32 +01:00
Camelid
fee4f8feb0 Improve wording of core::ptr::drop_in_place docs
And two small intra-doc link conversions in `std::{f32, f64}`.
2020-10-29 20:09:29 -07:00
Gray Olson
a6d98d8ec9 generalize warning 2020-10-13 11:03:31 -07:00
Jacob Kiesel
a7d3368448 Stabilize clamp 2020-10-12 15:09:45 -06:00
Trevor Spiteri
50d3ddcb0c make ln_1p examples more representative of use
With this commit, the examples for ln_1p would fail if (x + 1.0).ln()
is used instead of x.ln_1p().
2020-09-23 12:02:49 +02:00
Trevor Spiteri
37ce212f1f make exp_m1 examples more representative of use
With this commit, the examples for exp_m1 would fail if x.exp() - 1.0
is used instead of x.exp_m1().
2020-09-23 12:01:25 +02:00
Gray Olson
72a5cbbe81 Edit documentation for std::{f32,f64}::mul_add.
Makes it more clear that a performance improvement is not guaranteed
when using FMA, even when the target architecture supports it natively.
2020-09-21 13:07:48 -07:00
Lzu Tao
a4e926daee std: move "mod tests/benches" to separate files
Also doing fmt inplace as requested.
2020-08-31 02:56:59 +00:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00