4 ms·
VRSQRT28 too, which has max 2^-28 rel error. https://software.intel.com/en-us/articles/reference-implementations-for-IA-approximation-instructions-vrcp14-vrsqr
by zbjornson 8y ago
VRSQRT28 too, which has max 2^-28 rel error.
https://software.intel.com/en-us/articles/reference-implementations-for-IA-approximation-instructions-vrcp14-vrsqrt14-vrcp28-vrsqrt28-vexp2 https://software.intel.com/en-us/articles/reference-implemen...
- piyush_soni 8y agoThanks, I came here to ask the similar question about native optimizations on this 'hack'. Apologies for my lack of knowledge, but I'm a little confused on which one to use out of all these variants while compiling C++ code on a 64 bit platform for the standard 'float' type inverse square root? Are there varying levels of compromise between speed and accuracy among all these methods? Thanks ...
- stephencanon 8y agoFor a generic 64b platform, use RSQRTSS/RSQRTPS, since it's the only one that will exist. The others are specific to rather new hardware. My recollection is that it's accurate to 11.5 bits, so after one refinement step you have nearly full precision (an error bound of a couple ULP). Check Intel's docs for more details.
- piyush_soni 8y agoThanks!
- stephencanon 8y agoNote that VRSQRT28 is in AVX-512ER, which is Xeon Phi only.
- deleted 8y ago[deleted]