ceil method
Returns the smallest (closest to negative infinity) value that is not less than the argument and is equal to a mathematical integer. Special cases:
- If this value is NaN, returns NaN.
@return the smallest (closest to negative infinity) value that is not less than the argument and is equal to a mathematical integer.
Implementation
DD ceil() {
if (isNaN()) return NaN;
double fhi = hi.ceilToDouble();
double flo = 0.0;
// Hi is already integral. Ceil the low word
if (fhi == hi) {
flo = lo.ceilToDouble();
// do we need to renormalize here?
}
return new DD.withHiLo(fhi, flo);
}