statrs-dev / statrs

Statistical computation library for Rust
https://docs.rs/statrs/latest/statrs/
MIT License
585 stars 83 forks source link

Support for multiple numeric types #17

Open boxtown opened 8 years ago

boxtown commented 8 years ago

Currently statrs only supports f64 but I'd like to at the minimum extend that to f32 and possibly other numeric types as well (especially for things in the statistics module). The num crate might be worth looking into but I'm hesistant about introducing the dependency when it might make it's way in to the standard library at some point.

vks commented 8 years ago

I don't think num will move to the standard library. In fact, it has been moved out of it.

boxtown commented 8 years ago

@vks I was under the impression that a float trait would make it's way into the stdlib once associated constants is implemented and stable? I'm not saying I refuse to use num just hesistant for now

vks commented 8 years ago

Some traits might be moved. For now you could just depend on num_traits, which is a fairly lightweight dependency.

boxtown commented 8 years ago

Yeah it just depends on when I get to this. Trying to port statistics::Statistics to Iterator is being a HUGE pain in my side

boxtown commented 7 years ago

This has been a really huge effort and pain with in my opinion not enough tangible benefits. Hate to do this but punting on this until the future if ever, and will restart v0.4.0 with other more useful targets

bluss commented 7 years ago

num-trait's interfaces are far from ideal. Basically needs a redesign, or entirely new interfaces to deal with float ←→ float conversions.

YeungOnion commented 5 months ago

num_traits has fallible conversion between floats with NumCast trait, think this is good to close now. Thoughts?