Lines Matching refs:trailingDigit
671 int8_t trailingDigit = getDigitPos(position); in roundToMagnitude() local
673 if (position <= 0 && !isApproximate && (!nickel || trailingDigit == 0 || trailingDigit == 5)) { in roundToMagnitude()
689 if (nickel && trailingDigit != 2 && trailingDigit != 7) { in roundToMagnitude()
691 if (trailingDigit < 2) { in roundToMagnitude()
694 } else if (trailingDigit < 5) { in roundToMagnitude()
697 } else if (trailingDigit < 7) { in roundToMagnitude()
723 if (leadingDigit == 0 && (!nickel || trailingDigit == 0 || trailingDigit == 5)) { in roundToMagnitude()
731 } else if (leadingDigit == 4 && (!nickel || trailingDigit == 2 || trailingDigit == 7)) { in roundToMagnitude()
739 } else if (leadingDigit == 5 && (!nickel || trailingDigit == 2 || trailingDigit == 7)) { in roundToMagnitude()
747 } else if (leadingDigit == 9 && (!nickel || trailingDigit == 4 || trailingDigit == 9)) { in roundToMagnitude()
755 } else if (nickel && trailingDigit != 2 && trailingDigit != 7) { in roundToMagnitude()
757 if (trailingDigit < 2) { in roundToMagnitude()
760 } else if (trailingDigit < 5) { in roundToMagnitude()
763 } else if (trailingDigit < 7) { in roundToMagnitude()
794 if (position <= 0 && (!nickel || trailingDigit == 0 || trailingDigit == 5)) { in roundToMagnitude()
806 ? (trailingDigit < 2 || trailingDigit > 7 in roundToMagnitude()
807 || (trailingDigit == 2 && section != roundingutils::SECTION_UPPER) in roundToMagnitude()
808 || (trailingDigit == 7 && section == roundingutils::SECTION_UPPER)) in roundToMagnitude()
809 : (trailingDigit % 2) == 0; in roundToMagnitude()
829 if (trailingDigit < 5 && roundDown) { in roundToMagnitude()
833 } else if (trailingDigit >= 5 && !roundDown) { in roundToMagnitude()
835 trailingDigit = 9; in roundToMagnitude()
846 if (trailingDigit == 9) { in roundToMagnitude()