293
5-21 Floating-point Math Instructions
The Floating-point Math Instructions convert data and perform floating-point
arithmetic operations. Version-2 CVM1 CPUs support the following instructions.
Code Mnemonic Name
450 FIX (*) FLOATING TO 16-BIT
451 FIXL (*) FLOATING TO 32-BIT
452 FLT (*) 16-BIT TO FLOATING
453 FLTL (*) 32-BIT TO FLOATING
454 +F (*) FLOATING-POINT ADD
455 –F (*) FLOATING-POINT SUBTRACT
456
*F (*)
FLOATING-POINT MULTIPLY
457 /F (*) FLOATING-POINT DIVIDE
458 RAD (*) DEGREES TO RADIANS
459 DEG (*) RADIANS-TO-DEGREES
460 SIN (*) SINE
461 COS (*) COSINE
462 TAN (*) TANGENT
463 ASIN (*) SINE TO ANGLE
464 ACOS (*) COS TO ANGLE
465 ATAN (*) TANGENT TO ANGLE
466 SQRT (*) SQUARE ROOT
467 EXP (*) EXPONENT
468 LOG (*) LOGARITHM
Floating-point data expresses real numbers using a sign, exponent, and mantis-
sa. When data is expressed in floating-point format, the following formula ap-
plies.
Real number = (–1)
s
2
e–127
(1.f)
s: Sign
e: Exponent
f: Mantissa
The floating-point data format conforms to the IEEE754 standards. Data is ex-
pressed in 32 bits, as follows:
Sign
se f
Exponent Mantissa
MSB 30 23 22 LSB
Data No. of bits Contents
s:sign 1 0: positive; 1: negative
e:exponent 8 The exponent (e) value ranges from 0 to 255.
The actual exponent is the value remaining
after 127 is subtracted from e, resulting in a
range of –127 to 128. “e=0” and “e=255”
express special numbers.
f: mantissa 23 The mantissa portion of binary floating-point
data fits the formal 2.0 > 1.f 1.0.
The number of effective digits for floating-point data is 24 bits for binary ( approx-
imately seven digits decimal).
Data Format
Number of Digits
Floating-point Math Instructions
Section 5-21