2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubbas_intern.h"
10 Compares two IEEE double precision numbers
35 AROS_LHQUAD2(LONG
, IEEEDPCmp
,
36 AROS_LHAQUAD(double, y
, D0
, D1
),
37 AROS_LHAQUAD(double, z
, D2
, D3
),
38 struct MathIeeeDoubBasBase
*, MathIeeeDoubBasBase
, 7, MathIeeeDoubBas
43 QUAD
* Qy
= (QUAD
*)&y
;
44 QUAD
* Qz
= (QUAD
*)&z
;
48 SetSR(Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
52 if (is_lessSC(*Qy
,0,0) /* y < 0 */ && is_lessSC(z
,0,0) /* z < 0 */)
56 if (is_greater(*Qy
,*Qz
) /* -y > -z */ )
58 SetSR(0, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
63 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
68 if ( is_less(*Qy
,*Qz
) /* (QUAD)y < (QUAD)z */ )
70 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
75 SetSR(0, Zero_Bit
| Negative_Bit
| Overflow_Bit
);