2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubbas_intern.h"
8 /*****************************************************************************
12 AROS_LHQUAD1(double, IEEEDPCeil
,
15 AROS_LHAQUAD(double, y
, D0
, D1
),
18 struct MathIeeeDoubBasBase
*, MathIeeeDoubBasBase
, 16, MathIeeeDoubBas
)
21 Calculates the ceil-value of a IEEE double precision number
28 negative : result is negative
40 *****************************************************************************/
44 QUAD
* Qy
= (QUAD
*)&y
;
46 if (is_eqC((*Qy
),0,0))
48 SetSR(Zero_Bit
, Negative_Bit
|Overflow_Bit
|Zero_Bit
);
52 XOR64QC((*Qy
), IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
);
53 /* Ceil(y) = -Floor(-y); */
55 if (is_eqC((*Qy
), 0x0, 0x0))
57 Set_Value64C((*Qy
), 0, 0);
62 XOR64QC((*Qy
), IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
);