beautypg.com

Motorola DSP96002 User Manual

Page 662

background image

MOTOROLA

DSP96002 USER’S MANUAL

B-143

fadd.s d4,d0 1 1
move d0.s,y:output
_gen --- ---
Totals: 5 5

B.2

IEEE STANDARD CONFORMANCE FUNCTIONS

B.2.1

IEEE Remainder

B.2.2 IEEE floating-point Round to Integer

The IEEE standard section 5.5 specifies that it shall be possible to round a floating-point number to an in-

tegral valued floating point number in the same format. If the rounding mode is round to nearest, the round-

ed result is even if the difference between the rounded result and the unrounded operand is exactly one

half.

Program

ICycles

Words

fint d0 ;round to nearest integer 1 1
--- ---
1 1

The FINT instruction rounds the number in d0 according to the current rounding mode.

B.2.3 IEEE floating-point to Decimal String

B.2.4 IEEE Decimal String to floating-point

B.2.5 Format Conversions

The IEEE standard states that it shall be possible to convert between all supported floating-point formats

and all supported integer formats. Conversions between floating-point integers and integer formats shall

be exact unless an exception arises. If the floating point number is infinity, a NaN or overflows the integer

data type, then the invalid operation is signaled.

Some conversions may require range checking to signal an error if the source would produce an invalid

result for the destination data type. In some programming languages, the programmer is responsible for

the correct value of the source and the conversion of an out of range source produces an erroneous result.

In the conversion descriptions, conversions that require range checking will perform the actual range