about summary refs log tree commit diff
path: root/src/libcore/num/float.rs
AgeCommit message (Collapse)AuthorLines
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-1387/+0
This only changes the directory names; it does not change the "real" metadata names.
2013-05-17Implement sin_cos method for float, f64 and f32Brendan Zabarauskas-0/+8
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-1/+1
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-14Add ldexp and frexp functionsBrendan Zabarauskas-1/+62
2013-05-14Add inverse hyperbolic functionsBrendan Zabarauskas-0/+82
2013-05-08Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[cfg(debug)]Zack Corr-9/+9
2013-05-07Add is_normal and classify methods to Float traitBrendan Zabarauskas-15/+44
2013-05-07Add abs_sub method to Signed traitBrendan Zabarauskas-1/+33
2013-05-07Fix order of methodsBrendan Zabarauskas-12/+13
2013-05-07Implement exp_m1 and ln_1p as methods for FloatBrendan Zabarauskas-7/+22
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-07Switch to using 'ln' for the natural logarithm and 'log' for arbitrary base ↵Brendan Zabarauskas-9/+17
logarithms
2013-05-06Add assert_approx_eq! macroBrendan Zabarauskas-74/+65
2013-05-06Move FuzzyEq trait into core::cmp and rename it to 'ApproxEq'Brendan Zabarauskas-0/+25
2013-05-04Register snapshotsBrian Anderson-6/+1
2013-05-02libcore: Export core::from_str::FromStr from core::preludegifnksm-2/+1
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-10/+0
2013-05-01Revert rename of Div to QuotBrendan Zabarauskas-7/+3
2013-04-29Revert "Merge Exponential and Hyperbolic traits"Brendan Zabarauskas-0/+2
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-29Merge Exponential and Hyperbolic traitsBrendan Zabarauskas-2/+0
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-29Move appropriate functions out of Real and into separate Algebraic, ↵Brendan Zabarauskas-69/+110
Trigonometric, Exponential and Hyperbolic traits
2013-04-27Propagate NaNs for Orderable methods impled on floating-point primitivesBrendan Zabarauskas-5/+19
2013-04-27Rename `nextafter` to `next_after` to match method name in FloatBrendan Zabarauskas-2/+2
2013-04-27Add additional constants to primitive floating point numbersBrendan Zabarauskas-0/+29
These follow the values defined in the C99 standard
2013-04-27Add mul_add and next_after methods to FloatBrendan Zabarauskas-0/+16
2013-04-27Add Orderable traitBrendan Zabarauskas-0/+29
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-26Add Int, Uint and Float traits for primitive numbersBrendan Zabarauskas-12/+34
2013-04-26Add Bitwise, Bounded, Primitive, and PrimitiveInt traitsBrendan Zabarauskas-0/+14
2013-04-26Minor style improvements for test functionsBrendan Zabarauskas-1/+1
Use argument pattern-matching for test_division_rule and remove visibility specifier for test_signed
2013-04-26Use `///` doc-comment form instead of `/** */`Brendan Zabarauskas-155/+155
2013-04-26Add is_zero method to ZeroBrendan Zabarauskas-9/+11
2013-04-25Restore Round trait and move appropriate methods out of RealBrendan Zabarauskas-25/+98
2013-04-25Add Fractional, Real and RealExt traitsBrendan Zabarauskas-26/+223
2013-04-25Use #[cfg(not(stage0))] to exclude items from stage0Brendan Zabarauskas-6/+2
As requested on the mailing list: https://mail.mozilla.org/pipermail/rust-dev/2013-April/003713.html
2013-04-25Move impls of `Num` out of core::num and clean up importsBrendan Zabarauskas-14/+10
2013-04-24Implement Signed and Unsigned traits and remove related predicate functionsBrendan Zabarauskas-60/+74
2013-04-23inline the primitive numeric operationsDaniel Micay-0/+9
2013-04-22Rename Div operator trait to Quot and Modulo operator trait to RemBrendan Zabarauskas-16/+29
2013-04-21librustc: use LLVM intrinsics for several floating point operations.Huon Wilson-1/+1
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-19Use assert_eq! instead of assert! and remove extraneous parenthesesBrendan Zabarauskas-96/+96
2013-04-18Add #[inline(always)] to each operator methodBrendan Zabarauskas-0/+12
2013-04-16libcore,std,syntax,rustc: move tests into `mod tests`, make them private (no ↵Huon Wilson-196/+199
pub mod or pub fn).
2013-04-14core: remove unnecessary unsafe blocks/functionsAlex Crichton-6/+6
2013-04-14Consolidate tests of numeric operationsBrendan Zabarauskas-12/+0
2013-04-14Generate NumCast impls and tests using macrosBrendan Zabarauskas-70/+0
2013-04-08libcore: from_str_common: provide option to ignore underscores.Huon Wilson-3/+3
Implement the possible improvement listed in the comment on from_str_bytes_common.
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-169/+169
2013-03-28Removing unused importsAlex Crichton-1/+2
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-18/+18
2013-03-22libcore: Remove `pure` from libcore. rs=depurePatrick Walton-60/+60
2013-03-22librustc: Remove all uses of `static` from functions. rs=destaticPatrick Walton-5/+5