Skip to content

Conversation

@Syonyk
Copy link
Contributor

@Syonyk Syonyk commented Jan 6, 2025

As demonstrated by test code in #1260 the behavior of pow() in non-round-to-nearest rounding modes is not exact. This causes behavior divergence from ARMv8 hardware when not using round-to-nearest. The updated forms match hardware properly across a range of values. The tests are not updated to handle rounding modes, as doing this in a cross-platform way is not trivial. However, all existing test vectors pass properly, and in more detailed testing, these changes are closer to hardware.

@Syonyk
Copy link
Contributor Author

Syonyk commented Jan 6, 2025

Okeday, needs a few tweaks...

@mr-c
Copy link
Collaborator

mr-c commented Jan 10, 2025

Okeday, needs a few tweaks...

Let me know if you need help dealing with the compiler complaints :-)

@mr-c
Copy link
Collaborator

mr-c commented Jan 28, 2025

@Syonyk The tests pass with the extra casts, but when I add _mm_setcsr(0x3f80) type testing, then a lot of functions start returning bad answers

@Syonyk
Copy link
Contributor Author

Syonyk commented Jan 30, 2025

Thanks, I'll poke at this more and see what I can come up with.

Syonyk and others added 2 commits March 12, 2025 17:20
As demonstrated by test code in
simd-everywhere#1260
the behavior of pow() in non-round-to-nearest rounding modes is not
exact.  This causes behavior divergence from ARMv8 hardware when not
using round-to-nearest.  The updated forms match hardware properly
across a range of values.  The tests are not updated to handle
rounding modes, as doing this in a cross-platform way is not trivial.
However, all existing test vectors pass properly, and in more
detailed testing, these changes are closer to hardware.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants