|
|
|
|
|
by Const-me
498 days ago
|
|
> 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. |
|
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.