85bd97fcfe
327: Add general Rem and Num implementations for Complex<T> r=cuviper a=carrutstick This should address #209 with eyes towards addressing #321. It was a little tricky to get `Rem` working for a general `Num`, and I had to add a `PartialOrd` constraint to get it working, but I think it should be fairly robust. I could probably use extra eyes on the `from_str_radix` function, as I mostly lifted the code from the `from_str` function and I may be missing some subtleties in how that works. |
||
---|---|---|
benches | ||
bigint | ||
ci | ||
complex | ||
derive | ||
doc | ||
integer | ||
iter | ||
macros | ||
rational | ||
src | ||
traits | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
bors.toml |
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;
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.