2 Copyright © 1995-2017, 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
22 floating point number.
25 y - IEEE double precision floating point number.
28 x - absolute value of y.
46 Set the sign-bit to zero.
48 *****************************************************************************/
52 QUAD
* Qy
= (QUAD
*)&y
;
55 if (is_eqC((*Qy
),0,0))
57 /* value is 0 -> set the Zero Flag */
58 SetSR( Zero_Bit
, Zero_Bit
| Overflow_Bit
| Negative_Bit
);
62 /* set the sign-bit to zero */
63 /* (*Qy) &= (IEEEDPMantisse_Mask | IEEEDPExponent_Mask) */
67 (IEEEDPMantisse_Mask_Hi
| IEEEDPExponent_Mask_Hi
),
68 (IEEEDPMantisse_Mask_Lo
| IEEEDPExponent_Mask_Lo
)
70 SetSR(0, Zero_Bit
| Overflow_Bit
| Negative_Bit
);