Skip to content

Commit eae3228

Browse files
authored
rand_distr/std_math: add note regarding other dependents (#1421)
1 parent bca078e commit eae3228

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

rand_distr/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ rustdoc-args = ["--generate-link-to-definition"]
2323
default = ["std"]
2424
std = ["alloc", "rand/std"]
2525
alloc = ["rand/alloc"]
26+
27+
# Use std's floating-point arithmetic instead of libm.
28+
# Note that any other crate depending on `num-traits`'s `std`
29+
# feature (default-enabled) will have the same effect.
2630
std_math = ["num-traits/std"]
31+
2732
serde1 = ["serde", "rand/serde1"]
2833

2934
[dependencies]

rand_distr/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ The floating point functions from `num_traits` and `libm` are used to support
2525
`no_std` environments and ensure reproducibility. If the floating point
2626
functions from `std` are preferred, which may provide better accuracy and
2727
performance but may produce different random values, the `std_math` feature
28-
can be enabled.
28+
can be enabled. (Note that any other crate depending on `num-traits` with the
29+
`std` feature (default-enabled) will have the same effect.)
2930

3031
## Crate features
3132

0 commit comments

Comments
 (0)