Commit Graph

15 Commits

Author SHA1 Message Date
Marvin Löbel
3edc7c0b9c Removed generic infinity, NaN and negative zero functions
Removed Round impl for integers
2013-02-15 05:46:07 +01:00
Marvin Löbel
adac6cb5c6 Moved numeric string conversion functions into own module 2013-02-15 03:29:36 +01:00
Patrick Walton
216e85fadf libcore: Move the numeric operations out of Num. r=brson
Sadly I could not use trait inheritance due to a type parameter substitution
bug.
2013-02-14 08:14:01 -08:00
Nick Desaulniers
4445b38df2 Remove die!, raplace invocations with fail! Issue #4524 pt 3 2013-02-13 17:01:32 -08:00
Graydon Hoare
e5aa399e0d rustc and std: teach about #[bench], modernize to use quote_expr! some. 2013-02-13 11:46:25 -08:00
Graydon Hoare
73280b0472 core: add abs to num. 2013-02-13 11:46:25 -08:00
Brendan Zabarauskas
48b2141b83 Add NumCast trait for generic numeric type casts 2013-02-11 12:33:05 +11:00
Marvin Löbel
974d5ac1e0 Fixed errors resulting from rebase. 2013-02-03 15:37:25 -08:00
Marvin Löbel
af4972f3ce Fixed fmt!, tests, doc-tests. 2013-02-03 15:37:25 -08:00
Marvin Löbel
98445d95d4 Removed wrong/wip doc 2013-02-03 15:37:25 -08:00
Marvin Löbel
5b0335ec8e Added generic string <-> number conversion functions to core::num.
They unify the different implementations that exists in int-template.rs, uint-template.rs and float.rs into one pair of functions, which are also in principle usable for anything that implements the necessary numeric traits. Their usage is somewhat complex due to the large amount of arguments each one takes, but as they're not meant to be used directly that shouldn't be a problem.
2013-02-03 15:37:24 -08:00
Marvin Löbel
bb9c3ed876 Added some generic number functions to core::num
Also fixes previous commit not compiling due to not finding Option.
2013-02-03 15:37:24 -08:00
Marvin Löbel
d13b23f37e Added ToStrRadix and FromStrRadix traits 2013-02-03 15:37:24 -08:00
Marvin Löbel
96f0512a45 Added Round trait to core 2013-02-03 15:37:23 -08:00
Marvin Löbel
40f0b45f8e Moved all numeric modules in core into own directory
Reason: Better grouping of related modules, future-proving for a more extensive math library.
2013-02-03 15:37:23 -08:00