acde249bf7
It should use the destination type and not the source type to check if the conversion would be to a value that's in range. NOTE: A finite f64 value that is larger than the f32 value range now produces None when converted to f32 with ToPrimitive. Previously, too large f64 values would produce inf f32 values. This `as` cast has an undefined result and was not specified to always produce for example `inf`. The conversion preserves nan/+-inf specifically. |
||
---|---|---|
.travis | ||
benches | ||
bigint | ||
complex | ||
doc | ||
integer | ||
iter | ||
macros | ||
rational | ||
src | ||
traits | ||
.gitignore | ||
.multirust.sh | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
Makefile | ||
README.md |
README.md
num
A collection of numeric types and traits for Rust.
This includes new types for big integers, rationals, and complex numbers, new traits for generic programming on numeric properties like `Integer, and generic range iterators.
Usage
Add this to your Cargo.toml
:
[dependencies]
num = "0.1"
and this to your crate root:
extern crate num;