2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "mathieeedoubbas_intern.h"
10 Calculates the ceil-value of a IEEE double precision number
15 negative : result is negative
34 AROS_LHQUAD1(double, IEEEDPCeil
,
35 AROS_LHAQUAD(double, y
, D0
, D1
),
36 struct MathIeeeDoubBasBase
*, MathIeeeDoubBasBase
, 16, MathIeeeDoubBas
41 QUAD
* Qy
= (QUAD
*)&y
;
43 if (is_eqC((*Qy
),0,0))
45 SetSR(Zero_Bit
, Negative_Bit
|Overflow_Bit
|Zero_Bit
);
49 XOR64QC((*Qy
), IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
);
50 /* Ceil(y) = -Floor(-y); */
52 if (is_eqC((*Qy
), 0x0, 0x0))
54 Set_Value64C((*Qy
), 0, 0);
59 XOR64QC((*Qy
), IEEEDPSign_Mask_Hi
, IEEEDPSign_Mask_Lo
);