Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
src/ | H | 03-May-2022 | - | 6,155 | 2,822 | |
tests/ | H | 03-May-2022 | - | 397 | 331 | |
.cargo-checksum.json | H A D | 03-May-2022 | 89 | 1 | 1 | |
.cargo_vcs_info.json | H A D | 01-Jan-1970 | 74 | 6 | 5 | |
.gitignore | H A D | 28-Feb-2019 | 18 | 3 | 2 | |
Cargo.toml | H A D | 01-Jan-1970 | 1.2 KiB | 38 | 34 | |
Cargo.toml.orig-cargo | H A D | 22-May-2019 | 653 | 28 | 23 | |
LICENSE-APACHE | H A D | 28-Feb-2019 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | H A D | 28-Feb-2019 | 1 KiB | 26 | 22 | |
README.md | H A D | 28-Feb-2019 | 1.4 KiB | 52 | 35 | |
RELEASES.md | H A D | 22-May-2019 | 6.2 KiB | 155 | 105 | |
build.rs | H A D | 10-May-2019 | 309 | 15 | 11 |
README.md
1# num-traits 2 3[![crate](https://img.shields.io/crates/v/num-traits.svg)](https://crates.io/crates/num-traits) 4[![documentation](https://docs.rs/num-traits/badge.svg)](https://docs.rs/num-traits) 5![minimum rustc 1.8](https://img.shields.io/badge/rustc-1.8+-red.svg) 6[![Travis status](https://travis-ci.org/rust-num/num-traits.svg?branch=master)](https://travis-ci.org/rust-num/num-traits) 7 8Numeric traits for generic mathematics in Rust. 9 10## Usage 11 12Add this to your `Cargo.toml`: 13 14```toml 15[dependencies] 16num-traits = "0.2" 17``` 18 19and this to your crate root: 20 21```rust 22extern crate num_traits; 23``` 24 25## Features 26 27This crate can be used without the standard library (`#![no_std]`) by disabling 28the default `std` feature. Use this in `Cargo.toml`: 29 30```toml 31[dependencies.num-traits] 32version = "0.2" 33default-features = false 34``` 35 36The `Float` and `Real` traits are only available when `std` is enabled. The 37`FloatCore` trait is always available. `MulAdd` and `MulAddAssign` for `f32` 38and `f64` also require `std`, as do implementations of signed and floating- 39point exponents in `Pow`. 40 41Implementations for `i128` and `u128` are only available with Rust 1.26 and 42later. The build script automatically detects this, but you can make it 43mandatory by enabling the `i128` crate feature. 44 45## Releases 46 47Release notes are available in [RELEASES.md](RELEASES.md). 48 49## Compatibility 50 51The `num-traits` crate is tested for rustc 1.8 and greater. 52