2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubbas_intern.h"
8 /*****************************************************************************
12 AROS_LHQUAD1(double, IEEEDPNeg
,
15 AROS_LHAQUAD(double, y
, D0
, D1
),
18 struct MathIeeeDoubBasBase
*, MathIeeeDoubBasBase
, 10, MathIeeeDoubBas
)
21 Switch the sign of the given IEEE double precision
31 negative : result is negative
38 Flip the sign-bit (even for zeroes).
40 *****************************************************************************/
44 QUAD
* Qy
= (QUAD
*)&y
;
46 /* change the sign-bit */
47 XOR64QC(*Qy
, IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
);
51 is_eqC(*Qy
, 0x0, 0x0 )
52 || is_eqC(*Qy
, IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
)
55 SetSR( Zero_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
60 if(is_lessSC(*Qy
, 0x0, 0x0) )
62 /* result is negative */
63 SetSR(Negative_Bit
, Zero_Bit
| Negative_Bit
| Overflow_Bit
);
67 /* result is positive */
68 SetSR(0, Zero_Bit
| Overflow_Bit
| Negative_Bit
);