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