aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/bench
diff options
context:
space:
mode:
authorGravatar Antonio Sanchez <cantonios@google.com>2021-03-03 09:41:46 -0800
committerGravatar Antonio Sanchez <cantonios@google.com>2021-03-03 09:41:46 -0800
commite72dfeb8b9fa5662831b5d0bb9d132521f9173dd (patch)
treebdc7a7bd7f8fa13a65bd71897282bcc4e3bc87d5 /unsupported/bench
parent199c5f2b47eb1f8e5a2d20e60f07e97cd95a6ba6 (diff)
Fix rint for SSE/NEON.
It seems *sometimes* with aggressive optimizations the combination `psub(padd(a, b), b)` trick to force rounding is compiled away. Here we replace with inline assembly to prevent this (I tried `volatile`, but that leads to additional loads from memory). Also fixed an edge case for large inputs `a` where adding `b` bumps the value up a power of two and ends up rounding away more than just the fractional part. If we are over `2^digits` then just return the input. This edge case was missed in the test since the test was comparing approximate equality, which was still satisfied. Adding a strict equality option catches it.
Diffstat (limited to 'unsupported/bench')
0 files changed, 0 insertions, 0 deletions