/** * Ceiling, round towards positive infinity. * <P> * Possible loss of precision. */ public static BigInteger ceiling(BigFraction f) { // [rounding step, possible loss of precision step] return round(f, BigDecimal.ROUND_CEILING); }
/** * Floor, round towards negative infinity. * <P> * Possible loss of precision. */ public static BigInteger floor(BigFraction f) { // [rounding step, possible loss of precision step] return round(f, BigDecimal.ROUND_FLOOR); }
/** * Floor, round towards negative infinity. * <P> * Possible loss of precision. */ public static BigInteger floor(BigFraction f) { // [rounding step, possible loss of precision step] return round(f, BigDecimal.ROUND_FLOOR); }
/** * Truncate, round towards zero. * <P> * Possible loss of precision. */ public static BigInteger trunc(BigFraction f) { // [rounding step, possible loss of precision step] return round(f, BigDecimal.ROUND_DOWN); }
/** * Ceiling, round towards positive infinity. * <P> * Possible loss of precision. */ public static BigInteger ceiling(BigFraction f) { // [rounding step, possible loss of precision step] return round(f, BigDecimal.ROUND_CEILING); }
/** * Integer part. * <P> * Possible loss of precision. */ public static BigInteger integerPart(BigFraction f) { // [rounding step, possible loss of precision step] return round(f, BigDecimal.ROUND_DOWN); }
/** * Truncate, round towards zero. * <P> * Possible loss of precision. */ public static BigInteger trunc(BigFraction f) { // [rounding step, possible loss of precision step] return round(f, BigDecimal.ROUND_DOWN); }
/** * Integer part. * <P> * Possible loss of precision. */ public static BigInteger integerPart(BigFraction f) { // [rounding step, possible loss of precision step] return round(f, BigDecimal.ROUND_DOWN); }
/** {@inheritDoc} */ public ISignedNumber round() { return IntegerSym.valueOf(NumberUtil.round(fRational, BigDecimal.ROUND_HALF_EVEN)); }
/** {@inheritDoc} */ @Override public IInteger round() { return AbstractIntegerSym.valueOf(NumberUtil.round(fFraction, BigDecimal.ROUND_HALF_EVEN)); }
/** {@inheritDoc} */ @Override public IInteger round() { BigFraction temp = new BigFraction(fNumerator, fDenominator); return AbstractIntegerSym.valueOf(NumberUtil.round(temp, BigDecimal.ROUND_HALF_EVEN)); }