about summary refs log tree commit diff
path: root/src/libnum
AgeCommit message (Collapse)AuthorLines
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-2/+2
2014-10-03Set the `non_uppercase_statics` lint to warn by defaultP1start-30/+36
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-2/+2
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-2/+1
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-2/+2
2014-09-23Deprecate `#[ignore(cfg(...))]`Steven Fackler-1/+1
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
2014-09-23Fix regression and overflow bug for rationals.Joseph Crail-5/+44
2014-09-22Fix deprecation warnings in check-docs.Victor Berger-0/+10
Fallout of closing #17185.
2014-09-22auto merge of #17339 : treeman/rust/doc-things, r=alexcrichtonbors-20/+20
Also some cleanup to conform to documentation style.
2014-09-19Add enum variants to the type namespaceNick Cameron-31/+31
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-17Test fixes from the rollupAlex Crichton-0/+3
2014-09-17doc: Cleanup.Jonas Hietala-20/+20
Remove ~~~ for code block specification. Use /// Over /** */ for doc blocks.
2014-09-16Deprecate libnum in favor of rust-lang/numAaron Turon-1/+3
This is part of the migration of crates into the Cargo ecosystem. There is now an external repository https://github.com/rust-lang/num for bignums. The single use of libnum elsewhere in the repository is for a shootout benchmark, which is being moved into the external crate. Due to deprecation, this is a: [breaking-change]
2014-09-09Remove some test warnings.Jonas Hietala-42/+42
2014-09-07auto merge of #17005 : bjz/rust/bit-count, r=thestingerbors-1/+1
Fixes rust-lang/rfcs#224
2014-09-05auto merge of #16775 : jbcrail/rust/fix-rational-docs, r=pcwaltonbors-2/+2
Minor corrections to Rational documentation.
2014-09-05Make integer bit count methods return uintsBrendan Zabarauskas-1/+1
Fixes rust-lang/rfcs#224
2014-09-02auto merge of #16850 : vks/rust/hash-num, r=alexcrichtonbors-8/+24
Updates #15294.
2014-08-31Fix whitespace and missing parentheses.Joseph Crail-2/+2
2014-08-30rollup merge of #16778 : jbcrail/fix-issue-15826Alex Crichton-6/+29
2014-08-30Unify non-snake-case lints and non-uppercase statics lintsP1start-0/+1
This unifies the `non_snake_case_functions` and `uppercase_variables` lints into one lint, `non_snake_case`. It also now checks for non-snake-case modules. This also extends the non-camel-case types lint to check type parameters, and merges the `non_uppercase_pattern_statics` lint into the `non_uppercase_statics` lint. Because the `uppercase_variables` lint is now part of the `non_snake_case` lint, all non-snake-case variables that start with lowercase characters (such as `fooBar`) will now trigger the `non_snake_case` lint. New code should be updated to use the new `non_snake_case` lint instead of the previous `non_snake_case_functions` and `uppercase_variables` lints. All use of the `non_uppercase_pattern_statics` should be replaced with the `non_uppercase_statics` lint. Any code that previously contained non-snake-case module or variable names should be updated to use snake case names or disable the `non_snake_case` lint. Any code with non-camel-case type parameters should be changed to use camel case or disable the `non_camel_case_types` lint. [breaking-change]
2014-08-29complex: use `///...` instead of `/**...*/` for commentVinzent Steinberg-4/+2
2014-08-29num: implement `Hash` for `Complex` and `Ratio`Vinzent Steinberg-4/+22
2014-08-28Fix issue #15826.Joseph Crail-6/+29
The implemented fix rounds half-way cases away from zero as described in the original comments. This rounding algorithm is sometimes called arithmetic rounding. It is described further here: http://en.wikipedia.org/wiki/Rounding#Round_half_away_from_zero I also added several new tests to prevent regressions.
2014-08-26Use temp vars for implicit coercion to ^[T]Nick Cameron-3/+3
2014-08-17auto merge of #16558 : Gankro/rust/hashbig, r=pcwaltonbors-1/+55
Pretty self-explanatory. Only annoying thing is that it *seems* that I had to add `#![feature(default_type_params)]` to libnum because of Hasher. Don't know if there's a way around that. Fix #16551
2014-08-17Make BigUint and BigInt Hash, fixes #16551Alexis Beingessner-1/+55
2014-08-16auto merge of #16475 : treeman/rust/complex-divide-by-zero-test, r=alexcrichtonbors-0/+8
Did not find a test for it.
2014-08-14Add a test for complex divide by zero.Jonas Hietala-0/+8
2014-08-13core: Change the argument order on splitn and rsplitn for strs.Brian Anderson-2/+2
This makes it consistent with the same functions for slices, and allows the search closure to be specified last. [breaking-change]
2014-08-06Use byte literal in libnumnham-1/+1
2014-07-29Improve documentation of rounding functionsPiotr Jawniak-8/+19
2014-07-29Rename Integer trait `divides` to `is_multiple_of`.Jonas Hietala-20/+43
It is being changed because the previous wording was ambiguous. `a.divides(b)` implied `a % b == 0` but it sounds like the other way around. `9.divides(&3) == true` but we might read that as "does 9 divide 3?". It has been renamed to sidestep the ambiguity. Work around the change by using `is_multiple_of` instead. [breaking-change]
2014-07-17auto merge of #15718 : treeman/rust/integer-doc, r=alexcrichtonbors-18/+90
Simple usage examples for Integer methods. Also group `div_rem` and `div_mod_floor` together at the bottom of the trait, to reflect the documentation rendering.
2014-07-16Main example for bigint usage.Jonas Hietala-42/+68
Also use `///` for documentation instead of `/**`. End comments with `.`. Show imports for bigint example. They might be useful.
2014-07-16Examples for Integer trait methods.Jonas Hietala-18/+90
2014-07-11Update doc URLs for version bumpBrian Anderson-1/+1
2014-07-09Register new snapshotsAlex Crichton-2/+0
Closes #15544
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-7/+8
[breaking-change]
2014-07-06auto merge of #15417 : pfalabella/rust/rational-signed, r=alexcrichtonbors-0/+44
2014-07-05Add #[crate_name] attributes as necessaryAlex Crichton-2/+3
2014-07-05Added num::Signed implementation to Ratio (squashed)Paolo Falabella-0/+44
2014-07-04auto merge of #15343 : alexcrichton/rust/0.11.0-release, r=brsonbors-2/+2
2014-07-02Merge remote-tracking branch 'origin/master' into 0.11.0-releaseAlex Crichton-6/+7
Conflicts: src/libstd/lib.rs
2014-07-02Rationals that have a 1 denom should print like intsPaolo Falabella-17/+28
2014-06-29Implement RFC#28: Add PartialOrd::partial_cmpSteven Fackler-5/+6
I ended up altering the semantics of Json's PartialOrd implementation. It used to be the case that Null < Null, but I can't think of any reason for an ordering other than the default one so I just switched it over to using the derived implementation. This also fixes broken `PartialOrd` implementations for `Vec` and `TreeMap`. RFC: 0028-partial-cmp
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-1/+1
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2