xvrsqrtedp
Vector Reciprocal Square Root Estimate Double-Precision
Estimates the reciprocal square root of double-precision floating-point values in vector registers.
Details
This instruction estimates the reciprocal square root of each element in a double-precision floating-point vector and stores the result in another vector register. The estimate has a relative error no greater than one part in 16384 of the reciprocal of the square root of the source value.
Pseudocode Operation
if MSR.VSX=0 then VSX_Unavailable()
ex_flag ←0b0
do i = 0 to 1
reset_xflags()
src ←bfp_CONVERT_FROM_BFP64(VSR[32×BX+B].dword[i])
v ←bfp_RECIPROCAL_SQUARE_ROOT_ESTIMATE(src)
rnd ←bfp_ROUND_TO_BFP64(0b0,FPSCR.RN,v)
vresult.dword[i] ←bfp64_CONVERT_FROM_BFP(rnd)
if vxsqrt_flag=1 then SetFX(FPSCR.VXSQRT)
if zx_flag=1 then SetFX(FPSCR.ZX)
if vxsnan_flag=1 then SetFX(FPSCR.VXSNAN) if vxsnan_flag=1 then SetFX(FPSCR.VXSNAN)
end
if ex_flag=0 then VSR[32×TX+T] ←vresult
Programming Note
The xvrsqrtedp instruction is used to estimate the reciprocal square root of each element in a double-precision floating-point vector. It requires VSX (Vector Scalar Extensions) to be enabled, otherwise, it will raise an exception. The result has a relative error no greater than one part in 16384. Be cautious with special values like NaNs or zeros, as they can trigger exceptions and set specific flags in the FPSCR register.
Example
Encoding
Operands
-
XT
Target Vector Register -
XB
Source Vector Register