fnabs

Floating Negative Absolute Value

fnabs FRT, FRB

Computes negative absolute value of a float.

Details

Computes the negative absolute value of a double-precision floating-point number in FRB and places the result in FRT. The sign bit is set to 1 while all other bits are taken from the absolute value. No exception flags are set.

Pseudocode Operation

FRT ← -abs(FRB)

Programming Note

The fnabs instruction is useful for converting a positive floating-point number to its negative counterpart while maintaining its magnitude. Ensure that the input register (FRB) contains a valid floating-point value; otherwise, the result may be undefined. This operation does not affect the FPSCR register, so no exception flags are set based on the input value.

Example

fnabs f1, f3

Encoding

Binary Layout
63
0
FRT
6
0
11
FRB
16
136
21
/
31
 
Format X-form
Opcode 0xFC000110
Extension Floating-Point
Registers Altered FPSCR

Operands

  • FRT
    Target
  • FRB
    Source