Page 1 of 1

SQRT or RSQRT - that is the question

Posted: 2023-11-26, 7:35:19
by damianmoz
While sqrt is a basic IEEE 754 operation, I have always found rsqrt a more useful quantity (from which I can deduce sqrt anyway).

Are there any plans for a rsqrt primitive or an approximation to it?

Same question about reciprocal rather than a true division although there is potentially less justification for this.

Just curious.

Re: SQRT or RSQRT - that is the question

Posted: 2023-11-26, 8:21:43
by agner
Existing instruction sets have several different instructions for fast reciprocal and fast rsqrt with different precisions. It will be a mess if different hardware implementations have different precision for the same instruction. Therefore, I think these have to be optional implementation-specific instructions.