Skip to content

Commit

Permalink
rand_distr/std_math: add note regarding other dependents (#1421)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardy committed Apr 10, 2024
1 parent bca078e commit eae3228
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions rand_distr/Cargo.toml
Expand Up @@ -23,7 +23,12 @@ rustdoc-args = ["--generate-link-to-definition"]
default = ["std"]
std = ["alloc", "rand/std"]
alloc = ["rand/alloc"]

# Use std's floating-point arithmetic instead of libm.
# Note that any other crate depending on `num-traits`'s `std`
# feature (default-enabled) will have the same effect.
std_math = ["num-traits/std"]

serde1 = ["serde", "rand/serde1"]

[dependencies]
Expand Down
3 changes: 2 additions & 1 deletion rand_distr/README.md
Expand Up @@ -25,7 +25,8 @@ The floating point functions from `num_traits` and `libm` are used to support
`no_std` environments and ensure reproducibility. If the floating point
functions from `std` are preferred, which may provide better accuracy and
performance but may produce different random values, the `std_math` feature
can be enabled.
can be enabled. (Note that any other crate depending on `num-traits` with the
`std` feature (default-enabled) will have the same effect.)

## Crate features

Expand Down

0 comments on commit eae3228

Please sign in to comment.