-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_ldexp failure on armel #111
Comments
My conclusion after some experimentation is that this appears to be an issue in the underlying floating point implementation. Specifically it seems that powi and division (but not multiplication) on armel underflows to zero earlier than it should. I did some testing with gcc and clang and couldn't reproduce the issue, so this seems to be rust specific. The good news is, this only seems to affect the test code, not the code under test. My first suspicion was that powi was responsible, so I replaced it with my own naive implementation, that failed too. However after some tweaking I managed to produce a powi function that produces the correct results. Specifically the key seems to be after raising to the positive equivilent of power rather than doing 1 / x directly, I do 2 / x and then multiply by 0.5. I'm going to make an upload to Debian working around this issue soon. |
The left is what this crate computes, and that is the correct value, the same as |
Hi,
with the update to 0.4.1, we see the following test failure in Debian on our armel (armv5te-unknown-linux-gnueabi) architecture:
See https://buildd.debian.org/status/fetch.php?pkg=rust-num-rational&arch=armel&ver=0.4.1-1&stamp=1671490743&raw=0 for the full log.
The text was updated successfully, but these errors were encountered: