summary refs log tree commit diff
path: root/src/libcore/float.rs
AgeCommit message (Collapse)AuthorLines
2012-10-11Make to_str pure and fix const parameters for str-mutating functionsTim Chevalier-5/+7
Two separate changes that got intertwined (sorry): Make to_str pure. Closes #3691 In str, change functions like push_char to take an &mut str instead of an &str. Closes #3710
2012-09-28demode vecNiko Matsakis-1/+1
2012-09-27Finish de-exporting box, char, float. Part of #3583.Graydon Hoare-31/+15
2012-09-26libcore: Partially de-export char, f32, f64, and floatPatrick Walton-43/+41
2012-09-26Demode vec::push (and convert to method)Niko Matsakis-1/+1
2012-09-25Demode Num trait and implsTim Chevalier-18/+18
2012-09-23Register snapshots. Remove redundant Eq impls, Makefile hacksBrian Anderson-16/+0
2012-09-21Install new pub/priv/export rules as defaults, old rules accessible under ↵Graydon Hoare-0/+1
#[legacy_exports];
2012-09-20rustc: De-mode all overloaded operatorsPatrick Walton-0/+16
2012-09-07rustc: Add an "ne" method to the Eq trait, and implement it everywherePatrick Walton-0/+1
2012-09-05Start making moves explicit in libcoreTim Chevalier-2/+1
This is in preparation for issue 2633. Replaced implicit moves that rely on last-use with explicit moves in char, float, and str.
2012-09-04libcore: "import" -> "use"Patrick Walton-13/+13
2012-09-01Remove the 'to' keywordBrian Anderson-2/+2
2012-08-29rustc: Make `<=`, `>=`, and `>` use traits as wellPatrick Walton-0/+3
2012-08-29rustc: Make `<` and `=` into traitsPatrick Walton-2/+11
2012-08-27libcore: Replace a bunch of "== None" with ".is_none()".Patrick Walton-10/+10
Generally, "== None" calls into the shape glue, and it's also more useful.
2012-08-26Camel case the option typeBrian Anderson-47/+47
2012-08-14Fix build breakageTim Chevalier-1/+2
2012-08-14Make Num::from_int a static methodTim Chevalier-7/+7
2012-08-13More core mode forbidding.Graydon Hoare-6/+10
2012-08-13core: Camel case some lesser-used modulesBrian Anderson-2/+2
2012-08-13core: Export f32::ge(), f64::ge(), and float::ge()Chris Peterson-2/+2
2012-08-08Convert impls to new syntaxBrian Anderson-1/+1
2012-08-06Convert alt to match. Stop parsing altBrian Anderson-7/+7
2012-08-05Switch alts to use arrowsBrian Anderson-28/+18
2012-08-01Convert ret to returnBrian Anderson-27/+27
2012-07-31Change remaining "iface" occurrences to "trait"; deprecate "iface"Lindsey Kuper-1/+1
2012-07-26core: Mark a bunch of numeric functions as purePatrick Walton-24/+24
2012-07-14Move the world over to using the new style string literals and types. Closes ↵Michael Sullivan-52/+52
#2907.
2012-07-12Get rid of all of the remaining /~s in the code base.Michael Sullivan-2/+2
2012-07-04convert doc-attributes to doc-comments using ↵Gareth Daniel Smith-79/+79
./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498
2012-06-29Switch the compiler over to using ~[] notation instead of []/~. Closes #2759.Michael Sullivan-4/+4
2012-06-25Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725.Michael Sullivan-5/+5
2012-06-25Remove redundant 'extension' mods from numeric modsBrian Anderson-17/+24
2012-06-25Automatically export methods on core numeric typesBen Striegel-11/+13
Each numeric type now contains an extensions module that is automatically exported. At the moment each extensions module contains only the impl for the `num::num` iface. Other impls soon to follow (hopefully).
2012-06-21Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.Graydon Hoare-2/+2
2012-06-14Comments only: Annotate FIXMEs in libcoreTim Chevalier-1/+1
2012-06-07Add neg() to the num ifacePatrick Walton-0/+1
2012-06-07libcore: Add a num typeclassPatrick Walton-0/+32
2012-06-04Machine types are different from int/uint, etc (Issue #2187)Eric Holk-20/+86
2012-06-02(float) fix some rounding errors when showing as strKevin Cantu-11/+64
This seems to fix issue #1876, and some of the superficial parts of issue #1375. The #fmt macro and the to_str functions will round, rather than truncate, floats as strings. Other issues remain, and I wrote more code here than intended, but the following should pass now. ``` fn x() { assert "3.1416" == #fmt["%.4f", 3.14159]; assert "3" == #fmt["%.0f", 3.14159]; assert "99" == #fmt["%.0f", 98.5]; assert "7.0000" == #fmt["%.4f", 6.999999999]; assert "3.141590000" == #fmt["%.9f", 3.14159]; } ```
2012-04-19Disallow rebinding / matching against consts in altsTim Chevalier-3/+3
As per Issue #1193. Closes #1193. I had to rename a few variables ("info" and "epsilon") to avoid clashing with in-scope constants, which is responsible for all the changes other than resolve and issue-1193.rs.
2012-04-15add inf/-inf/NaN parsing to float::from_strGrahame Bowland-0/+18
add tests for "inf"/"-inf"/"NaN" conversion add tests for "-0." -> -0., "0." -> 0.
2012-04-08core: Add tests for the string repr of infinityBrian Anderson-0/+6
2012-04-09write out "inf"/"-inf" in float::to_str_commonGrahame Bowland-0/+2
2012-03-15Comments only: associate FIXMEs in float libs with issue numbersTim Chevalier-2/+3
2012-03-13Name types after their modules instead of 't'Brian Anderson-2/+0
2012-03-09core: Convert to rustdocBrian Anderson-55/+45
2012-03-07add mutability annotations to libcoreNiko Matsakis-16/+16
2012-02-28expose float::pow_with_uint.Erick Tryzelaar-6/+7