Commit Graph

23 Commits

Author SHA1 Message Date
Josh Stone d798bd4fb8 Add arithmetic/logical shifts to PrimInt 2016-01-27 23:30:33 -08:00
Alex Burka 5962dd29c9 remove stale #[deriving(Zero)] docs
Fixes #156.
2016-01-15 13:29:34 -05:00
Gustorn 3ccb4bd6c5 Added Sized trait bound for traits that requite it
See rust-lang/rfcs#1214
2015-08-19 19:11:55 +02:00
Alex Crichton 0a7847cd65 Merge pull request #99 from b52/issue-93-float-min-positive
Provide generic around f32/f64::MIN_POSITIVE
2015-05-26 07:23:41 -07:00
Oliver Mader 785e07d83c Re-export `cast` for ergonomic reasons 2015-05-26 15:03:34 +02:00
Oliver Mader 6c9f457712 Provide generic around f32/f64::MIN_POSITIVE 2015-05-26 14:56:43 +02:00
Josh Triplett 6f2db9b631 Factor out more generic macro to run a macro on each tuple type 2015-04-25 17:03:05 -07:00
Josh Triplett c6163dac40 traits.rs: Implement Bounded for tuples of Bounded types
For example, the following will print (4294967295, 65535):

extern crate num;
use num::traits::Bounded;

fn main() {
    let t : (u32, u16) = Bounded::max_value();
    println!("{:?}", t);
}
2015-04-25 16:50:03 -07:00
mitchmindtree 63d2e79c1e Added temporary fix for unstable std from_str_radix method 2015-04-24 15:17:42 +10:00
mitchmindtree 3028d602e6 Fixed issue where unstable version of from_str_radix was being called instead of the local Num trait version 2015-04-24 04:57:37 +10:00
kennytm fd86a2c531 Make sure PrimInt is actually implemented for the primitive types. 2015-04-05 03:10:40 +08:00
kennytm 24d2f15ccf Avoid and remove some unstable features.
The only #[feature] left for now is the bencher.
2015-04-05 03:09:29 +08:00
Alex Crichton 996128bd4b Fix some doc tests 2015-04-03 10:26:37 -07:00
Aaron Turon 63c7a25ed9 Update to 1.0.0-beta (stable only)
Along the way, this commit also rationalizes the traits a bit more.

Moving to stable required vendoring a couple of minor things (notably,
radix formatting).
2015-04-03 10:17:39 -07:00
Aaron Turon 03db5c9d1b Vendor deprecated/unstable traits from std::num
This commit brings in a load of unstable and/or deprecated traits from
the `std::num` module. These traits provide for some degree of generic
programming over numeric types. They are not stable in `std` mostly
because we want more time to iterate on their design. Moving them to the
`num` crate allows existing code to keep using this functionality as we
do so.

Closes #74
2015-04-02 20:04:38 -07:00
Alex Crichton 9848257eae Update to rust master 2015-03-19 09:57:18 -07:00
Austin Bonander f260a7f565 Upgrade to latest Rust 2015-02-20 10:37:11 -08:00
Sam Payson 609c2e6ef0 Minor changes to silence warnings. 2015-02-18 16:41:28 -08:00
Huon Wilson 139cf8cf66 Bump to 0.1.7. 2015-01-09 22:36:03 +11:00
gifnksm 8219095e39 update to rust mater 2015-01-05 01:59:44 +09:00
Sven Nilsen ae3bb3619c Upgrade to latest Rust
A `_0` test fails, but don’t know why
2015-01-03 19:30:05 +01:00
Chase McCarthy a7e9e79049 Add semicolons to macro lines 2014-12-18 21:01:24 -05:00
gifnksm 2155e7d2ee Add numeric functions and `traits` module that provide numeric traits for generic
mathematcs.

Import numeric traits and functions that were removed from the standard library.
This also implements `AdditiveIterator` and `MultiplicativeIterator` for
`BigUint` and `BigInt`.

closes #28
2014-11-16 19:37:49 +09:00