-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
math: all_test.go: test failures in TestLog2 on ppc64 (and s390) #9066
Comments
Comment 1 by vogt@linux.vnet.ibm.com: regarding 3) I think, the alike() function is broken by design for the same reason as (1). It cannot reasonably be expected that the result of the Log... functions is bit exact for all input values (unless the math library would use a higher precision internally, which it doesn't). The test for equality in the alike() function is too strict. Assuming thet library code has been handmade to be bit exact given specific compiler, platform and test cases it's not surprising that it fails with other platforms or compiler, e.g. depending on optimisation choices. |
Comment 3 by laboger@linux.vnet.ibm.com: This testcase fails on ppc64 and ppc64le as well. |
(1) It seems reasonable to expect Log2 on powers of two to get exactly the right answer. Will fix the implementation. (2) Thanks, will fix tolerance. (3) alike is for exact matching. It's a stricter form of ==, for testing the outputs on special cases. We definitely do not want a tolerance there. I believe fixing Log2 on powers of two (in particular, Log2(1)) will make alike a non-issue. |
by vogt@linux.vnet.ibm.com:
The text was updated successfully, but these errors were encountered: