-
Notifications
You must be signed in to change notification settings - Fork 137
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
[aarch64] Fix fmin and fmax on aarch64 #140
Conversation
Would it be possible to add a regression test? Also, do you mind linking some official information about this problem? |
Do you think it is better to test a signalling NaN input to all functions? |
No, I think it is enough to add a regression test for this particular PR. |
apt-get update at travis did not work anymore, so I added lines for updating expired keys and removing an apt source relating to mongo-db following the comments in travis-ci/travis-ci#8554 to .travis.yml. |
apt-get update problem seems to be fixed now. |
As for the operation carried out by the aarch64 instructions, they are the minNum and maxNum operations defined in section 5.3 and 6.2.3 of IEEE Std 754™-2008. http://ieeexplore.ieee.org/document/4610935/ The IEEE standard specifies that signaling NaNs should be propagated in these operations. On the other hand, the C99 standard does not distinguish between a quiet NaN and a signaling NaN. Since SLEEF is a substitute of the C99 math library, propagation of a signaling NaN is not desirable. |
vmaxnum_v*_v*_v* and vminnum_v*_v*_v* are helper functions for utilizing instructions for choosing larger and smaller elements from two given vectors, and they are introduced in the following PR.
#109
It is said that vmaxnmq and vminnmq on aarch64 are IEEE754-conformant, but I recently found that handling of signalling NaN by these instructions is not conforming to the specification of fmin and fmax functions in the ANSI C standard.
This patch fixes that problem.