2014-09-23 20:27:05 +00:00
|
|
|
# num
|
|
|
|
|
2015-11-22 00:39:00 +00:00
|
|
|
A collection of numeric types and traits for Rust.
|
|
|
|
|
|
|
|
This includes new types for big integers, rationals, and complex numbers,
|
2017-05-03 06:41:43 +00:00
|
|
|
new traits for generic programming on numeric properties like `Integer`,
|
2015-11-22 00:39:00 +00:00
|
|
|
and generic range iterators.
|
2014-09-23 20:27:05 +00:00
|
|
|
|
2015-11-13 02:40:13 +00:00
|
|
|
[Documentation](http://rust-num.github.io/num)
|
2014-12-23 17:54:56 +00:00
|
|
|
|
2014-09-23 20:27:05 +00:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
Add this to your `Cargo.toml`:
|
|
|
|
|
|
|
|
```toml
|
2014-11-20 20:07:56 +00:00
|
|
|
[dependencies]
|
2015-11-22 00:39:00 +00:00
|
|
|
num = "0.1"
|
2014-09-23 20:27:05 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
and this to your crate root:
|
|
|
|
|
|
|
|
```rust
|
|
|
|
extern crate num;
|
|
|
|
```
|
2017-02-10 00:09:48 +00:00
|
|
|
|
|
|
|
## Compatibility
|
|
|
|
|
|
|
|
Most of the `num` crates are tested for rustc 1.8 and greater.
|
|
|
|
The exceptions are `num-derive` which requires at least rustc 1.15,
|
|
|
|
and the deprecated `num-macros` which requires nightly rustc.
|