Lines Matching refs:rounding

58     const Real &y, Rounding rounding) const {  in Add()
90 return y.Add(*this, rounding); in Add()
96 return y.Add(*this, rounding); in Add()
100 if (rounding.mode == common::RoundingMode::Down) { in Add()
132 result, isNegative, exponent, fraction, rounding, roundingBits); in Add()
138 const Real &y, Rounding rounding) const { in Multiply()
189 NormalizeAndRound(result, isNegative, exponent, product.upper, rounding, in Multiply()
198 const Real &y, Rounding rounding) const { in Divide()
258 result, isNegative, exponent, quotient, rounding, roundingBits); in Divide()
265 ValueWithRealFlags<Real<W, P>> Real<W, P>::SQRT(Rounding rounding) const { in SQRT()
295 result = scaled.SQRT(rounding); in SQRT()
324 Fraction::ConvertUnsigned(extFrac.SHIFTR(2)).value, rounding, in SQRT()
376 const Real &y, Rounding rounding) const { in HYPOT()
386 auto yOverX{y.Divide(*this, rounding)}; // y/x in HYPOT()
388 auto squared{yOverX.value.Multiply(yOverX.value, rounding)}; // (y/x)**2 in HYPOT()
392 auto sum{squared.value.Add(one, rounding)}; // 1.0 + (y/x)**2 in HYPOT()
396 result = sqrt.value.Multiply(ABS(), rounding); in HYPOT()
407 const Real &y, Rounding rounding) const { in MOD()
409 auto quotient{Divide(y, rounding)}; in MOD()
421 Real product{toInt.Multiply(y, rounding).AccumulateFlags(result.flags)}; in MOD()
422 result.value = Subtract(product, rounding).AccumulateFlags(result.flags); in MOD()
430 const Real &y, Rounding rounding) const { in MODULO()
432 auto quotient{Divide(y, rounding)}; in MODULO()
444 Real product{toInt.Multiply(y, rounding).AccumulateFlags(result.flags)}; in MODULO()
445 result.value = Subtract(product, rounding).AccumulateFlags(result.flags); in MODULO()
452 const Real &y, Rounding rounding) const { in DIM()
458 result = Subtract(y, rounding); in DIM()
493 const Fraction &fraction, Rounding rounding, RoundingBits *roundingBits) { in Normalize() argument
511 if (rounding.mode == common::RoundingMode::TiesToEven || in Normalize()
512 rounding.mode == common::RoundingMode::TiesAwayFromZero || in Normalize()
513 (rounding.mode == common::RoundingMode::Up && !negative) || in Normalize()
514 (rounding.mode == common::RoundingMode::Down && negative)) { in Normalize()
553 Rounding rounding, const RoundingBits &bits, bool multiply) { in Round() argument
561 bits.MustRound(rounding, IsNegative(), word_.BTEST(0) /* is odd */)) { in Round()
577 if (rounding.x86CompatibleBehavior && Exponent() != 0 && multiply && in Round()
580 (rounding.mode != common::RoundingMode::Up && in Round()
581 rounding.mode != common::RoundingMode::Down))) { in Round()
594 bool isNegative, int exponent, const Fraction &fraction, Rounding rounding, in NormalizeAndRound() argument
597 isNegative, exponent, fraction, rounding, &roundingBits); in NormalizeAndRound()
598 result.flags |= result.value.Round(rounding, roundingBits, multiply); in NormalizeAndRound()
602 common::RoundingMode rounding) { in MapRoundingMode() argument
603 switch (rounding) { in MapRoundingMode()
634 const char *&p, Rounding rounding) { in Read() argument
636 decimal::ConvertToBinary<P>(p, MapRoundingMode(rounding.mode))}; in Read()