2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubtrans_intern.h"
8 /*****************************************************************************
12 AROS_LHQUAD1(LONG
, IEEEDPTieee
,
15 AROS_LHAQUAD(double, y
, D0
, D1
),
18 struct MathIeeeDoubTransBase
*, MathIeeeDoubTransBase
, 17, MathIeeeDoubTrans
)
21 Convert IEEE double to IEEE single precision number
26 IEEE single precision number
30 negative : result is negative
31 overflow : value was out of range for IEEE single precision
37 *****************************************************************************/
43 SetSR(0, Zero_Bit
| Overflow_Bit
| Negative_Bit
);
45 if (is_eqC(y
, 0x0, 0x0))
47 SetSR(Zero_Bit
, Zero_Bit
| Overflow_Bit
| Negative_Bit
);
53 /* calculate the exponent */
55 Res
= Res
+ 0x7e - 0x3fe;
58 Res
|= (tmp
& IEEESPMantisse_Mask
);
60 if (is_lessSC(y
, 0x0, 0x0))
62 SetSR(Negative_Bit
, Zero_Bit
| Overflow_Bit
| Negative_Bit
);
63 Res
|= IEEESPSign_Mask
;