fres
Floating Reciprocal Estimate Single
fres FRT, FRB
Estimates the reciprocal of a single-precision floating-point number.
Encoding
Binary Layout
59
0:5
FRT
6:10
0
11:15
0
16:20
FRB
21:25
24
26:30
/
31
Operands
-
FRT
Target -
FRB
Source -
FT
Target Floating-Point Register -
FB
Source Floating-Point Register
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.