2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubbas_intern.h"
8 /*****************************************************************************
12 AROS_LHQUAD2(LONG
, IEEEDPCmp
,
15 AROS_LHAQUAD(double, y
, D0
, D1
),
16 AROS_LHAQUAD(double, z
, D2
, D3
),
19 struct MathIeeeDoubBasBase
*, MathIeeeDoubBasBase
, 7, MathIeeeDoubBas
)
22 Compares two IEEE double precision numbers
40 *****************************************************************************/
44 QUAD
* Qy
= (QUAD
*)&y
;
45 QUAD
* Qz
= (QUAD
*)&z
;
49 SetSR(Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
53 if (is_lessSC(*Qy
,0,0) /* y < 0 */ && is_lessSC(z
,0,0) /* z < 0 */)
57 if (is_greater(*Qy
,*Qz
) /* -y > -z */ )
59 SetSR(0, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
64 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
69 if ( is_less(*Qy
,*Qz
) /* (QUAD)y < (QUAD)z */ )
71 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
76 SetSR(0, Zero_Bit
| Negative_Bit
| Overflow_Bit
);