Conversation
|
Unfortunately this algorithm has an exponent rounding error with subnormals for |
f37bf6f to
def2e46
Compare
|
The f128 issue is proving pretty tricky to fix. To help slim down the surface area, |
|
f128 division is working with full iterations 🎉 I need to figure out what is wrong with the half-width iterations, and do some more documentation. |
|
It looks like there are some platform-specific issues with the system libraries:
|
|
The i686 issue appears to be an ABI issue: GCC aligns
I believe the relevant LLVM issue is llvm/llvm-project#77401. |
|
Interesting, I am surprised that doesn't show up for the other functions. I suspect that the aarch64 division issue is another case of llvm/llvm-project#91840 that is still waiting on your fix to be merged. |
4dc87bc to
81b96a3
Compare
|
I think this is ready for a look when you get the chance @Amanieu.
|
|
Even with the extra iteration performance isn't bad. Not sure why we are that much faster here.
|
Amanieu
left a comment
There was a problem hiding this comment.
Overall LGTM, though I didn't check the algorithm in detail.
Float division requires some shift operations on big integers; implement right shift here.
Add some bounds to integer types that allow our function trait bounds to be slightly less verbose. Also clarify documentation and remove a redundant operation.
Float division currently has a separate `div32` and `div64` for `f32` and `f64`, respectively. Combine these to make use of generics. This will make it easier to support `f128` division, and reduces a lot of redundant code. This includes a simplification of division tests.
Use the new generic division algorithm to expose `__divtf3` and `__divkf3`.
|
Thanks for taking a look! I'll have some more improvements to do here but at least this gets us off the ground. |
This includes the following: - rust-lang/compiler-builtins#686 - rust-lang/compiler-builtins#622
This includes the following, which adds `__divtf3` - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
Update compiler-builtins to 0.1.130 This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
Update compiler-builtins to 0.1.130 This includes the following which add `__divtf3` and `__powtf2`, and do some feature cleanup: - rust-lang/compiler-builtins#622 - rust-lang/compiler-builtins#692 - rust-lang/compiler-builtins#614 - rust-lang/compiler-builtins#694 The `cc` bump [1] was previously included but was reverted due to problems updating. [1]: rust-lang/compiler-builtins#690
Division for
f128. Still pretty buggy