News for hackers. Stuff that matters.
Re:Revisiting the Fast Inverse Square Root – Is It Still Use... by Findecanor on Thursday April 20, 2023 @09:01PM (#35648603)
> 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.

If you're only on x86 and only recent processors then AMD's and Intel's implementations yield similar enough results that it could be feasible to use a lookup-table for the differences. <https://robert.ocallahan.org/2021/09/emulating-amd-rsqrtss-e...>

Re:Revisiting the Fast Inverse Square Root – Is It Still Use... by adgjlsfhk1 on Friday April 21, 2023 @12:58AM (#35649956)
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.