Earlier quoted context omitted.
> at least for sqrt(), internally it's likely implemented as a heuristic guess Square roots are implemented in hardware: https://www.felixcloutier.com/x86/sqrtsd > In software, you'd normally iterate Newton's Method Software normally computes trigonometric functions (and other complicated ones like exponents and std::erf) with a high-degree polynomial approximation.
>Square roots are implemented in hardware But how does that hardware implementation work internally? The point I'm trying to make is that it is probably an (in-hardware) loop that uses Newton's Method. ETA: The point being that, although in the source code it looks like all looks have been eliminated, they really haven't been if you dig deeper.
I don’t know, but based on performance difference between FP32 and FP64 square root instructions, the implementation probably produces 4-5 bits of mantissa per cycle.