| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2013-04-29 | Revert "Merge Exponential and Hyperbolic traits" | Brendan Zabarauskas | -3/+9 | |
| After discussions on IRC and #4819, we have decided to revert this change. This is due to the traits expressing different ideas and because hyperbolic functions are not trivially implementable from exponential functions for floating-point types. | ||||
| 2013-04-29 | Merge Exponential and Hyperbolic traits | Brendan Zabarauskas | -9/+3 | |
| The Hyperbolic Functions are trivially implemented in terms of `exp`, so it's simpler to group them the Exponential trait. In the future these would have default implementations. | ||||
| 2013-04-29 | Rename 'divisible_by' method to 'is_multiple_of', add tests for 'is_odd' and ↵ | Brendan Zabarauskas | -5/+67 | |
| 'is_even' | ||||
| 2013-04-29 | Move appropriate functions out of Real and into separate Algebraic, ↵ | Brendan Zabarauskas | -247/+287 | |
| Trigonometric, Exponential and Hyperbolic traits | ||||
| 2013-04-28 | make way for a new iter module | Daniel Micay | -1/+1 | |
| 2013-04-27 | Propagate NaNs for Orderable methods impled on floating-point primitives | Brendan Zabarauskas | -15/+75 | |
| 2013-04-27 | Fix copy-paste mistakes | Brendan Zabarauskas | -5/+5 | |
| 2013-04-27 | Remove unnecessary fallbacks | Brendan Zabarauskas | -82/+0 | |
| The `target_word_size` attribute is always available at compile time, so there is no need for a fallback. | ||||
| 2013-04-27 | Rename `nextafter` to `next_after` to match method name in Float | Brendan Zabarauskas | -8/+9 | |
| 2013-04-27 | Add additional constants to primitive floating point numbers | Brendan Zabarauskas | -1/+96 | |
| These follow the values defined in the C99 standard | ||||
| 2013-04-27 | Add mul_add and next_after methods to Float | Brendan Zabarauskas | -2/+55 | |
| 2013-04-27 | Add Orderable trait | Brendan Zabarauskas | -2/+152 | |
| This is a temporary trait until we have default methods. We don't want to encumber all implementors of Ord by requiring them to implement these functions, but at the same time we want to be able to take advantage of the speed of the specific numeric functions (like the `fmin` and `fmax` intrinsics). | ||||
| 2013-04-26 | Combine PrimitiveInt, Int, and Uint traits into one single trait | Brendan Zabarauskas | -22/+6 | |
| Having three traits for primitive ints/uints seemed rather excessive. If users wish to specify between them they can simply combine Int with either the Signed and Unsigned traits. For example: fn foo<T: Int + Signed>() { … } | ||||
| 2013-04-26 | Add BitCount trait | Brendan Zabarauskas | -14/+285 | |
| 2013-04-26 | Add Int, Uint and Float traits for primitive numbers | Brendan Zabarauskas | -48/+120 | |
| 2013-04-26 | Add Bitwise, Bounded, Primitive, and PrimitiveInt traits | Brendan Zabarauskas | -0/+254 | |
| 2013-04-26 | Minor style improvements for test functions | Brendan Zabarauskas | -5/+2 | |
| Use argument pattern-matching for test_division_rule and remove visibility specifier for test_signed | ||||
| 2013-04-26 | Use `///` doc-comment form instead of `/** */` | Brendan Zabarauskas | -663/+662 | |
| 2013-04-26 | Add is_zero method to Zero | Brendan Zabarauskas | -37/+40 | |
| 2013-04-25 | Restore Round trait and move appropriate methods out of Real | Brendan Zabarauskas | -65/+305 | |
| 2013-04-25 | Add Fractional, Real and RealExt traits | Brendan Zabarauskas | -71/+722 | |
| 2013-04-25 | Use borrowed pointers for Integer methods | Brendan Zabarauskas | -71/+71 | |
| This brings them in line with the quot and rem traits, and is be better for large Integer types like BigInt and BigUint because they don't need to be copied unnecessarily. | ||||
| 2013-04-25 | Rename Natural to Integer | Brendan Zabarauskas | -3/+3 | |
| 'Natural' normally means 'positive integer' in mathematics. It is therefore strange to implement it on signed integer types. 'Integer' is probably a better choice. | ||||
| 2013-04-25 | Use #[cfg(not(stage0))] to exclude items from stage0 | Brendan Zabarauskas | -39/+11 | |
| As requested on the mailing list: https://mail.mozilla.org/pipermail/rust-dev/2013-April/003713.html | ||||
| 2013-04-25 | Move impls of `Num` out of core::num and clean up imports | Brendan Zabarauskas | -77/+53 | |
| 2013-04-24 | Removed ascii functions from other modules | Marvin Löbel | -7/+0 | |
| Replaced str::to_lowercase and str::to_uppercase | ||||
| 2013-04-24 | Implement Natural trait | Brendan Zabarauskas | -0/+333 | |
| This adds the following methods to ints and uints: - div - modulo - div_mod - quot_rem - gcd - lcm - divisible_by - is_even - is_odd I have not implemented Natural for BigInt and BigUInt because they're a little over my head. | ||||
| 2013-04-24 | Implement Signed and Unsigned traits and remove related predicate functions | Brendan Zabarauskas | -159/+292 | |
| 2013-04-23 | auto merge of #6034 : thestinger/rust/num, r=catamorphism,pcwalton | bors | -0/+58 | |
| 2013-04-23 | inline the primitive numeric operations | Daniel Micay | -0/+58 | |
| 2013-04-23 | Attempt to fix x86 only strconv test failure | Marvin Löbel | -3/+2 | |
| 2013-04-22 | core: ignore test from_str_ignore_underscores. Broken on i686. #6018 | Brian Anderson | -0/+1 | |
| 2013-04-22 | Rename Div operator trait to Quot and Modulo operator trait to Rem | Brendan Zabarauskas | -107/+192 | |
| 2013-04-21 | librustc: use LLVM intrinsics for several floating point operations. | Huon Wilson | -153/+166 | |
| Achieves at least 5x speed up for some functions! Also, reorganise the delegation code so that the delegated function wrappers have the #[inline(always)] annotation, and reduce the repetition of delegate!(..). | ||||
| 2013-04-19 | librustc: WIP patch for using the return value. | Patrick Walton | -2/+2 | |
| 2013-04-19 | Use assert_eq! instead of assert! and remove extraneous parentheses | Brendan Zabarauskas | -267/+260 | |
| 2013-04-18 | Add #[inline(always)] to each operator method | Brendan Zabarauskas | -0/+50 | |
| 2013-04-18 | Implement bitwise operator traits for ints and uints | Brendan Zabarauskas | -0/+69 | |
| 2013-04-16 | libcore,std,syntax,rustc: move tests into `mod tests`, make them private (no ↵ | Huon Wilson | -506/+522 | |
| pub mod or pub fn). | ||||
| 2013-04-14 | core: remove unnecessary unsafe blocks/functions | Alex Crichton | -6/+6 | |
| 2013-04-14 | Remove unnecessary enclosing modules for NumCast impls | Brendan Zabarauskas | -30/+22 | |
| 2013-04-14 | Consolidate tests of numeric operations | Brendan Zabarauskas | -83/+29 | |
| 2013-04-14 | Restore Num trait | Brendan Zabarauskas | -0/+22 | |
| This restores the trait that was lost in 216e85fadf465c25fe7bc4a9f06f8162ec12b552. It will eventually be broken up into a more fine-grained trait hierarchy in the future once a design can be agreed upon. | ||||
| 2013-04-14 | Remove trailing whitespace | Brendan Zabarauskas | -5/+5 | |
| 2013-04-14 | Add a test to show how NumCast can be used in type parameters | Brendan Zabarauskas | -1/+24 | |
| 2013-04-14 | Generate NumCast impls and tests using macros | Brendan Zabarauskas | -922/+114 | |
| 2013-04-14 | Clarify purpose of NumCast trait | Brendan Zabarauskas | -2/+2 | |
| 2013-04-09 | auto merge of #5769 : gifnksm/rust/range_step, r=bstrie | bors | -10/+49 | |
| `uint::range_step` or `int::range_step` causes overflow or underflow as following. code: ```rust fn main() { for uint::range_step(3, 0, -2) |n| { println(fmt!("%u", n)); } } ``` output: ``` 3 1 18446744073709551615 18446744073709551613 ... ``` This commit fixes this behavior as follows. ``` 3 1 ``` | ||||
| 2013-04-08 | auto merge of #5787 : alexcrichton/rust/less-mut-fields, r=catamorphism | bors | -47/+33 | |
| This removes some of the easier instances of mutable fields where the explicit self can just become `&mut self` along with removing some unsafe blocks which aren't necessary any more now that purity is gone. Most of #4568 is done, except for [one case](https://github.com/alexcrichton/rust/blob/less-mut-fields/src/libcore/vec.rs#L1754) where it looks like it has to do with it being a `const` vector. Removing the unsafe block yields: ``` /Users/alex/code/rust2/src/libcore/vec.rs:1755:12: 1755:16 error: illegal borrow unless pure: creating immutable alias to const vec content /Users/alex/code/rust2/src/libcore/vec.rs:1755 for self.each |e| { ^~~~ /Users/alex/code/rust2/src/libcore/vec.rs:1757:8: 1757:9 note: impure due to access to impure function /Users/alex/code/rust2/src/libcore/vec.rs:1757 } ^ error: aborting due to previous error ``` I also didn't delve too much into removing mutable fields with `Cell` or `transmute` and friends. | ||||
| 2013-04-08 | Removing no longer needed unsafe blocks | Alex Crichton | -47/+33 | |
