summary refs log tree commit diff
path: root/src/libstd/num/num.rs
AgeCommit message (Collapse)AuthorLines
2013-09-25rustdoc: Change all code-blocks with a scriptAlex Crichton-4/+4
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g' find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g' find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-19Rename the NaN and is_NaN methods to lowercase.Chris Morgan-2/+2
This is for consistency in naming conventions. - ``std::num::Float::NaN()`` is changed to ``nan()``; - ``std::num::Float.is_NaN()`` is changed to ``is_nan()``; and - ``std::num::strconv::NumStrConv::NaN()`` is changed to ``nan()``. Fixes #9319.
2013-09-15Remove {uint,int,u64,i64,...}::from_str,from_str_radixblake2-ppc-0/+5
Remove these in favor of the two traits themselves and the wrapper function std::from_str::from_str. Add the function std::num::from_str_radix in the corresponding role for the FromStrRadix trait.
2013-09-14Add Orderable bound to num::PrimitiveBrendan Zabarauskas-0/+1
2013-09-08Add Clone and DeepClone constraints to Primitive traitBrendan Zabarauskas-1/+4
2013-09-08Moved checked trait impls out of std::numBrendan Zabarauskas-378/+1
This follows the same pattern as the other numeric trait impls, and reduces the clutter in std::num.
2013-08-30std: Add a fixme for when we add Trait::<for T>::static_method()Erick Tryzelaar-0/+2
2013-08-29Remove the iter module.Jason Fager-0/+13
Moves the Times trait to num while the question of whether it should exist at all gets hashed out as a completely separate question.
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-12/+12
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.
2013-08-19auto merge of #8459 : thestinger/rust/checked, r=graydonbors-0/+4
2013-08-14Rewrite Saturating in terms of CheckedAdd/CheckedSubKevin Ballard-38/+25
2013-08-12Forbid pub/priv where it has no effectAlex Crichton-2/+2
Closes #5495
2013-08-12fix build with the new snapshot compilerDaniel Micay-37/+14
2013-08-11num: implement CheckedDivDaniel Micay-0/+4
2013-08-11disable 64-bit CheckedMul on 32-bitDaniel Micay-2/+4
code generation problem reported as issue #8449
2013-08-11add intrinsics for checked overflow add/sub/mulDaniel Micay-1/+448
2013-08-05Add std::num::SaturatingKevin Ballard-60/+157
Saturating is an implementation of saturating math operations (at the moment just add and sub) for integral types.
2013-07-30Improve std::num module description, and fix some formattingBrendan Zabarauskas-21/+4
2013-07-30Add some missing method wrappers to std::numBrendan Zabarauskas-2/+24
2013-07-18librustc: Forbid `&` pointers (other than `&'static`) inside `@` boxes.Patrick Walton-2/+2
This makes custom borrowing implementations for custom smart pointers sound.
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-2/+1
2013-07-08 Replaces the free-standing functions in f32, &c.Jens Nockert-5/+34
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
2013-06-28librustc: Remove the broken overloaded assign-ops from the language.Patrick Walton-1/+1
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-17/+17
2013-06-16Add copies to type params with Copy boundNiko Matsakis-3/+3
2013-06-14Add Zero impls for lots of common typesAlex Crichton-0/+15
2013-06-11std: convert pow, hypot, atan2, log to take arguments by reference.Huon Wilson-4/+4
2013-05-30Require documentation by default for libstdAlex Crichton-0/+3
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+494
This only changes the directory names; it does not change the "real" metadata names.