| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2013-05-14 | Fix cosmetics for fail!() calls | Marvin Löbel | -9/+7 | |
| 2013-05-14 | Use static string with fail!() and remove fail!(fmt!()) | Björn Steinbrink | -27/+27 | |
| fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself. | ||||
| 2013-05-14 | auto merge of #6463 : bjz/rust/numeric-traits, r=thestinger | bors | -1/+445 | |
| This is part of the numeric trait reform tracked on issue #4819 | ||||
| 2013-05-14 | Remove unnecessary infinity check | Brendan Zabarauskas | -4/+2 | |
| 2013-05-14 | Add ldexp and frexp functions | Brendan Zabarauskas | -1/+184 | |
| 2013-05-13 | Remove re-exports from libcore/core.rc | Alex Crichton | -0/+3 | |
| Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude. | ||||
| 2013-05-14 | Add inverse hyperbolic functions | Brendan Zabarauskas | -0/+263 | |
| 2013-05-12 | libsyntax: Tighten up expressions in patterns to only allow identifiers or ↵ | Patrick Walton | -5/+5 | |
| literals (possibly with a minus). This had very minimal fallout. | ||||
| 2013-05-13 | Make Float::classify matching more clear for f64 and f32 | Brendan Zabarauskas | -20/+14 | |
| 2013-05-10 | core: Use the new `for` protocol | Alex Crichton | -13/+88 | |
| 2013-05-08 | Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[cfg(debug)] | Zack Corr | -55/+55 | |
| 2013-05-07 | Add is_normal and classify methods to Float trait | Brendan Zabarauskas | -17/+170 | |
| 2013-05-07 | Add abs_sub method to Signed trait | Brendan Zabarauskas | -5/+126 | |
| 2013-05-07 | Fix order of methods | Brendan Zabarauskas | -24/+26 | |
| 2013-05-07 | Implement exp_m1 and ln_1p as methods for Float | Brendan Zabarauskas | -22/+65 | |
| Both expm1 and ln1p have been renamed to exp_m1 and ln_1p in order to be consistent with the underscore usage elsewhere. The exp_m1 method is used for increased accuracy when doing floating point calculations, so this has been moved from the more general 'Exponential' trait into 'Float'. | ||||
| 2013-05-07 | Switch to using 'ln' for the natural logarithm and 'log' for arbitrary base ↵ | Brendan Zabarauskas | -36/+49 | |
| logarithms | ||||
| 2013-05-06 | Add assert_approx_eq! macro | Brendan Zabarauskas | -223/+195 | |
| 2013-05-06 | Move FuzzyEq trait into core::cmp and rename it to 'ApproxEq' | Brendan Zabarauskas | -2/+78 | |
| 2013-05-04 | Register snapshots | Brian Anderson | -58/+6 | |
| 2013-05-02 | libcore: Export core::from_str::FromStr from core::prelude | gifnksm | -8/+3 | |
| 2013-05-02 | Remove 'Local Variable' comments | Brendan Zabarauskas | -41/+0 | |
| 2013-05-01 | Revert rename of Div to Quot | Brendan Zabarauskas | -126/+99 | |
| 2013-04-29 | auto merge of #6110 : bjz/rust/numeric-traits, r=pcwalton | bors | -252/+354 | |
| As discussed on issue #4819, I have created four new traits: `Algebraic`, `Trigonometric`, `Exponential` and `Hyperbolic`, and moved the appropriate methods into them from `Real`. ~~~rust pub trait Algebraic { fn pow(&self, n: Self) -> Self; fn sqrt(&self) -> Self; fn rsqrt(&self) -> Self; fn cbrt(&self) -> Self; fn hypot(&self, other: Self) -> Self; } pub trait Trigonometric { fn sin(&self) -> Self; fn cos(&self) -> Self; fn tan(&self) -> Self; fn asin(&self) -> Self; fn acos(&self) -> Self; fn atan(&self) -> Self; fn atan2(&self, other: Self) -> Self; } pub trait Exponential { fn exp(&self) -> Self; fn exp2(&self) -> Self; fn expm1(&self) -> Self; fn log(&self) -> Self; fn log2(&self) -> Self; fn log10(&self) -> Self; } pub trait Hyperbolic: Exponential { fn sinh(&self) -> Self; fn cosh(&self) -> Self; fn tanh(&self) -> Self; } ~~~ There was some discussion over whether we should shorten the names, for example `Trig` and `Exp`. No abbreviations have been agreed on yet, but this could be considered in the future. Additionally, `Integer::divisible_by` has been renamed to `Integer::is_multiple_of`. | ||||
| 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. | ||||
