Brian Anderson
4d10bdc5b9
std: Move intrinsics to std::intrinsics.
...
Issue #1457
2014-02-23 01:07:53 -08:00
Brendan Zabarauskas
79f52cf9ba
Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros
...
These are inspired by the [functions in the Julia standard library](http://docs.julialang.org/en/release-0.2/stdlib/base/#Base.count_ones ).
2014-02-17 13:55:06 +11:00
Brendan Zabarauskas
1f15d24243
Move int and uint overflow tests into macros
2014-02-01 13:03:02 +11:00
Chris Wong
988e4f0a1c
Uppercase numeric constants
...
The following are renamed:
* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`
Fixes #10010 .
2014-01-25 21:38:25 +13:00
Flavio Percoco
ed7e576d9c
Add a generic power function
...
The patch adds a `pow` function for types implementing `One`, `Mul` and
`Clone` trait.
The patch also renames f32 and f64 pow into powf in order to still have
a way to easily have float powers. It uses llvms intrinsics.
The pow implementation for all num types uses the exponentiation by
square.
Fixes bug #11499
2014-01-17 15:41:26 +01:00
Brendan Zabarauskas
1dd6906db2
Merge Bitwise and BitCount traits and remove from prelude, along with Bounded
...
One less trait in std::num, and three less exported in the prelude.
2014-01-16 11:51:33 +11:00
Luca Bruno
a9a7a427a1
std: uniform modules titles for doc
...
This commit uniforms the short title of modules provided by libstd,
in order to make their roles more explicit when glancing at the index.
Signed-off-by: Luca Bruno <lucab@debian.org>
2013-12-27 09:49:11 +01:00
Marvin Löbel
4840064f85
Removed module macro workaround for signed and unsigned integers
2013-11-29 20:36:47 +01:00
Brendan Zabarauskas
0fcb85997d
Moved checked trait impls out of std::num
...
This follows the same pattern as the other numeric trait impls, and reduces the clutter in std::num.
2013-09-08 13:48:15 +10:00
Huon Wilson
c437a16c5d
rustc: add a lint to enforce uppercase statics.
2013-07-01 17:52:57 +10:00
Graydon Hoare
d904c72af8
replace #[inline(always)] with #[inline]. r=burningtree.
2013-06-18 14:48:48 -07:00
Alex Crichton
ec8fb884e9
Remove usage of the #[merge] hack with int modules
2013-05-24 15:31:34 -05:00