Implement all stable and safe std f32/f64-methods on FF32 and FF64#1
Implement all stable and safe std f32/f64-methods on FF32 and FF64#1vkahl wants to merge 1 commit into
Conversation
All these method calls are delegated to the corresponding methods on the underlying primitive types (`f32` or `f64`). For all methods returning floats, these are getting converted to `Fast<_>`. Of course all of this only works when using std, so I added a feature gate called "std". Other changes: - added .gitignore file to ignore target directory - added #[inline(always)] annotations to `get`, `into` and operator methods
|
If we're going to have some feature development and make this crate something more serious than just an experiment, then we also need to address the top issue of making the FF64/FF32 constructors |
|
On further thought, there are (after the unsafe question) some methods here that I'd prefer to not implement. For example |
|
That makes a lot of sense. I was mostly going for a quick drop-in replacement for normal float types that uses the flag whenever possible. By now I figured out that it makes more sense to properly implement |
With nightly rust on LLVM 11 now (soon to be 12), the (Note that I don't think just making the constructors
+1 to this. Probably shouldn't offer a "fast" I think |
|
I also notice that impl_assignop is completely broken (uses |
All these method calls are delegated to the corresponding methods
on the underlying primitive types (
f32orf64). For all methodsreturning floats, these are getting converted to
Fast<_>.Of course all of this only works when using std, so I added a
feature gate called "std".
Other minor changes:
get,intoand operatormethods
cargo fmt