]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #20573 : huonw/rust/num-stab-2, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 6 Jan 2015 13:30:29 +0000 (13:30 +0000)
committerbors <bors@rust-lang.org>
Tue, 6 Jan 2015 13:30:29 +0000 (13:30 +0000)
cc #19260

Open questions:

- I still feel weird about marking functions like `exp` as `#[stable]` in `core` since they're highly likely to call into libm which is theoretically something core is designed to avoid and so we may be forced/want to move it at some point in the future, and so it feels like a lie to call it `#[stable]` (I know `core` is `#[experimental]`, but still...)
- `abs_sub` is a horrible name IMO: it feels like it is `(a - b).abs()`, but it is actually `(a - b).max(0.)`. maybe something along the lines of `pos_diff` ("positive difference") is better.
- the associated-function nature of `Int::from_be` and `Int::from_le` feel strange to me, it feels like they should be methods, but I cannot think of a good name.

I'm also not hugely in favour of `ldexp` and `frexp` but the precedent from C is large. (e.g. AFAICT,  `ldexp` must mean "load exponent" which is essentially what it does... but only for a subset of its inputs.)


Trivial merge