Go to file
bors[bot] f172ef3a6b Merge #350
350: Avoid large intermediate product in LCM r=cuviper a=mhogrefe

Changed the implementation of BigUint LCM from
`((self * other) / self.gcd(other))`
to
`self / self.gcd(other) * other`

The division is exact in both cases, so the result is the same, but the new code avoids the potentially-large intermediate product, speeding things up and using less memory.

I also removed the unnecessary parentheses, because I think it's clear what order everything will be executed in. But if others think differently I can add them back.
2017-12-14 08:07:15 +00:00
benches bigint: Add a modpow fallback for even modulus 2017-10-22 16:44:05 -07:00
bigint Avoid large intermediate product in LCM 2017-12-13 21:13:57 -05:00
ci Remove num-macros 2017-12-13 23:44:49 -08:00
complex complex: bump to 0.1.41 2017-12-01 13:02:13 -08:00
derive derive: bump to 0.1.41 2017-07-14 17:36:17 -07:00
doc Update repo and doc links 2015-11-12 18:40:13 -08:00
integer integer: bump to 0.1.35 2017-07-14 17:30:18 -07:00
iter iter: bump to 0.1.34 2017-07-14 17:38:12 -07:00
rational rational: bump to 0.1.40 2017-11-08 14:40:10 -08:00
src Made requested changes. 2017-02-07 13:02:32 -07:00
traits traits: bump to 0.1.41 2017-12-01 12:54:48 -08:00
.gitignore Update num-macros to Rust master 2015-05-14 10:19:47 -07:00
.travis.yml Downgrade libc for Rust 1.8 CI 2017-11-30 16:15:45 -08:00
Cargo.toml num: bump to 0.1.41 2017-12-01 13:31:33 -08:00
LICENSE-APACHE Initial seeding from rust repo 2014-09-16 10:35:35 -07:00
LICENSE-MIT Initial seeding from rust repo 2014-09-16 10:35:35 -07:00
README.md Remove num-macros 2017-12-13 23:44:49 -08:00
bors.toml Enable bors-ng 2017-07-08 22:29:48 -07:00

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.

Documentation

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 exception is num-derive which requires at least rustc 1.15.