2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubbas_intern.h"
8 /*****************************************************************************
12 AROS_LHQUAD1(double, IEEEDPAbs
,
15 AROS_LHAQUAD(double, y
, D0
, D1
),
18 struct MathIeeeDoubBasBase
*, MathIeeeDoubBasBase
, 9, MathIeeeDoubBas
)
21 Calculate the absolute value of the given IEEE double precision
38 set the sign-bit to zero
40 *****************************************************************************/
44 QUAD
* Qy
= (QUAD
*)&y
;
47 if (is_eqC((*Qy
),0,0))
49 /* value is 0 -> set the Zero Flag */
50 SetSR( Zero_Bit
, Zero_Bit
| Overflow_Bit
| Negative_Bit
);
54 /* set the sign-bit to zero */
55 /* (*Qy) &= (IEEEDPMantisse_Mask | IEEEDPExponent_Mask) */
59 (IEEEDPMantisse_Mask_Hi
| IEEEDPExponent_Mask_Hi
),
60 (IEEEDPMantisse_Mask_Lo
| IEEEDPExponent_Mask_Lo
)
62 SetSR(0, Zero_Bit
| Overflow_Bit
| Negative_Bit
);