fres
Floating Reciprocal Estimate Single
Estimates the reciprocal of a single-precision floating-point number.
Details
Computes an estimate of the reciprocal (1/x) of the single-precision floating-point value in FRB and stores the result in FRT. The estimate is accurate to approximately 1 part in 256 for normalized values. If Rc=1, CR1 is set based on the result; FPSCR exception bits are set according to the floating-point exception enable controls.
Pseudocode Operation
FRT ← estimate(1.0 / FRB)
if Rc = 1 then
CR1 ← (FRT_exception_summary)
Programming Note
The fres instruction provides a fast estimate of the reciprocal for single-precision floating-point numbers. It's useful in performance-critical applications where exact precision is not required, but speed is essential. Be cautious with inputs that have an unbiased exponent greater than +127, as they are treated as Infinity, which might lead to unexpected results if not handled properly.
Example
Encoding
Operands
-
FRT
Target -
FRB
Source -
FT
Target Floating-Point Register -
FB
Source Floating-Point Register