3 ms·
With appropriate rounding modes, the basic operations (+, -, *) are fairly short code sequences. Things like exp and 1/x can become adventures, but they're not
by pclmulqdq 4y ago
With appropriate rounding modes, the basic operations (+, -, *) are fairly short code sequences. Things like exp and 1/x can become adventures, but they're not too bad.
- stephencanon 4y agoDivision is actually pretty straightforward: compute a residual using the multiply-add that you already have, divide _that_, and then add it to the quotient. Or (roughly equivalently, but maybe easier to understand) do a native double division, then do a Newton-Raphson step, which requires only multiplication and addition (just like you would refine a reciprocal estimate).