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