Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rand_distr/std_math: add note regarding other dependents #1421

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions rand_distr/Cargo.toml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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