fres

Floating Reciprocal Estimate Single

fres FRT, FRB

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

fres f1, f3

Encoding

Binary Layout
59
0
FRT
6
0
30
0
31
FRB
24
/
 
Format A-form
Opcode 0xEC000030
Extension Floating-Point
Registers Altered FPSCR, CR0

Operands

  • FRT
    Target
  • FRB
    Source
  • FT
    Target Floating-Point Register
  • FB
    Source Floating-Point Register