Hacker News new | ask | show | jobs
by Findecanor 1157 days ago
> rsqrtps is implemented differently on different CPUs

That applies to x86 for sure. But the designers of ARM and RISC-V had the foresight to standardise the implementation of rsqrt to make it deterministic ... on each respective platform. But on either, the precision is only 7 bits.

Recent AMD and Intel x86-64 processors use 11 input bits, and the results are similar enough that only 22 results over the whole input range are different. Source: <https://robert.ocallahan.org/2021/09/emulating-amd-rsqrtss-e...>

1 comments

the point of 7 bits is that you can double the digits with newton if you need, so a bad but fast version lets you choose how accurate you need it.