2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathtrans_intern.h"
10 Convert FFP number to single precision ieee number
13 IEEE Single Precision Floating Point
17 negative : result is negative
18 overflow : exponent of the ieee-number was out of range for ffp
33 AROS_LH1(float, SPTieee
,
34 AROS_LHA(float, fnum
, D0
),
35 struct Library
*, MathTransBase
, 17, MathTrans
44 SetSR(Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
48 Exponent
= (fnum
& FFPExponent_Mask
) - 0x40 + 126;
50 Res
= ( Exponent
<< (30-7) );
51 Res
|= (((ULONG
)fnum
& 0x7fffff00) >> 8);
55 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
56 Res
|= IEEESPSign_Mask
;