| |||

Home > NEON and VFP Programming > NEON general arithmetic instructions > VRECPS and VRSQRTS |

`VRECPS`

(Vector Reciprocal Step) multiplies the
elements of one vector by the corresponding elements of another
vector, subtracts each of the results from 2, and places the final
results into the elements of the destination vector.

`VRSQRTS`

(Vector Reciprocal Square Root Step)
multiplies the elements of one vector by the corresponding elements
of another vector, subtracts each of the results from 3, divides
these results by two, and places the final results into the elements
of the destination vector.

V{`op`

}.F32 {`cond`

},`Qd`

,`Qn`

`Qm`

V{`op`

}.F32 {`cond`

},`Dd`

,`Dn`

`Dm`

where:

`op`

must be either

`RECPS`

or`RSQRTS`

.`cond`

is an optional condition code.

,`Qd`

,`Qn`

`Qm`

are the destination vector, the first operand vector, and the second operand vector, for a quadword operation.

,`Dd`

,`Dn`

`Dm`

are the destination vector, the first operand vector, and the second operand vector, for a doubleword operation.

Table 25 shows the results where input values are out of range.

**Table 25. Results for out-of-range inputs**

1st operand element | 2nd operand element | Result element (`VRECPS` ) | Result element (`VRSQRTS` ) |
---|---|---|---|

NaN | - | Default NaN | Default NaN |

- | NaN | Default NaN | Default NaN |

+/- 0.0 or denormal | +/- infinity | 2.0 | 1.5 |

+/- infinity | +/- 0.0 or denormal | 2.0 | 1.5 |

The Newton-Raphson iteration:

`x`

_{n+1}=`x`

(2-

_{n})`dx`

_{n}

converges to (`1/`

)
if `d`

`x`

_{0} is
the result of `VRECPE`

applied to

.`d`

The Newton-Raphson iteration:

`x`

_{n+1}=(3-`x`

_{n}`dx`

_{n}^{2})/2

converges to (

√`1/`

)if `d`

`x`

_{0} is
the result of `VRSQRTE`

applied to

.`d`

- Reference