num-traits

Numeric traits for generic mathematics in Rust

Latest version: 0.2.19 registry icon
Maintenance score
79
Safety score
100
Popularity score
52
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
0.2.19 0 0 0 0 0
0.2.18 0 0 0 0 0
0.2.17 0 0 0 0 0
0.2.16 0 0 0 0 0
0.2.15 0 0 0 0 0
0.2.14 0 0 0 0 0
0.2.13 0 0 0 0 0
0.2.12 0 0 0 0 0
0.2.11 0 0 0 0 0
0.2.10 0 0 0 0 0
0.2.9 0 0 0 0 0
0.2.8 0 0 0 0 0
0.2.7 0 0 0 0 0
0.2.6 0 0 0 0 0
0.2.5 0 0 0 0 0
0.2.4 0 0 0 0 0
0.2.3 0 0 0 0 0
0.2.2 0 0 0 0 0
0.2.1 0 0 0 0 0
0.2.0 0 0 0 0 0
0.1.43 0 0 0 0 0
0.1.42 0 0 0 0 0
0.1.41 0 0 0 0 0
0.1.40 0 0 0 0 0
0.1.39 0 0 0 0 0
0.1.38 0 0 0 0 0
0.1.37 0 0 0 0 0
0.1.36 0 0 0 0 0
0.1.35 0 0 0 0 0
0.1.34 0 0 0 0 0
0.1.33 0 0 0 0 0
0.1.32 0 0 0 0 0

Stability
Latest release:

0.2.19 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

Apache-2.0   -   Apache License 2.0

Not a wildcard

Not proprietary

OSI Compliant


MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



num-traits

crate documentation minimum rustc 1.60 build status

Numeric traits for generic mathematics in Rust.

Usage

Add this to your Cargo.toml:

[dependencies]
num-traits = "0.2"

Features

This crate can be used without the standard library (#![no_std]) by disabling the default std feature. Use this in Cargo.toml:

[dependencies.num-traits]
version = "0.2"
default-features = false
# features = ["libm"]    # <--- Uncomment if you wish to use `Float` and `Real` without `std`

The Float and Real traits are only available when either std or libm is enabled.

The FloatCore trait is always available. MulAdd and MulAddAssign for f32 and f64 also require std or libm, as do implementations of signed and floating- point exponents in Pow.

Releases

Release notes are available in RELEASES.md.

Compatibility

The num-traits crate is tested for rustc 1.60 and greater.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.