num-traits/src
bors[bot] 93be5dbff2 Merge #23
23: Add RealNum trait for real data types (Float, but without floating-point specific features) r=cuviper a=yoanlcq

This is supposed to fix [#19](https://github.com/rust-num/num-traits/issues/19); I assumed going ahead would be better than bumping the thread.  

In any case, I understand that it is a quite significant addition and won't mind too much if it doesn't make it.

This adds a new `RealNum` trait, along with a universal impl `impl<T: Float> RealNum for T { ... }`.  
Therefore, this shouldn't be a breaking change, except in places where both traits are imported (which obviously only happened in a few places in this crate).

The intent is that generic code may prefer to use `RealNum` instead of `Float` when floating-point isn't a requirement. In the future (next major version ?), I guess `Float` could be made to only provide floating-point-specific features on top of `RealNum`.

Most of the code+doc was copy-pasted from `Float`, but the doc comments should be up-to-date with the situation; `Float` only makes an appearance when talking about NaN and infinity.

Issues I've seen : 
- `RealNum` might not be the name we want;
- I've mentioned that `sqrt()` is allowed to panic if the input is negative and has no meaningful NaN representation;
- Should we do that too for e.g `log()` ? Like `sqrt()`, it's supposed to return Nan when `x < 0`.

Thanks for your time. :)
2018-01-19 01:39:13 +00:00
..
ops Fix checked shift RHS to u32, drop from PrimInt 2018-01-13 15:02:38 +01:00
bounds.rs Move num-traits to its own repo 2017-12-18 17:35:41 -08:00
cast.rs Include note for implementers of AsPrimitive 2018-01-14 21:23:19 +00:00
float.rs Move num-traits to its own repo 2017-12-18 17:35:41 -08:00
identities.rs Move num-traits to its own repo 2017-12-18 17:35:41 -08:00
int.rs Fix checked shift RHS to u32, drop from PrimInt 2018-01-13 15:02:38 +01:00
lib.rs Merge #23 2018-01-19 01:39:13 +00:00
pow.rs Move num-traits to its own repo 2017-12-18 17:35:41 -08:00
real.rs Remove legacy default implementations 2018-01-18 21:32:46 +01:00
sign.rs Move num-traits to its own repo 2017-12-18 17:35:41 -08:00