private static void scaleDownTenRoundUp(Slice decimal, int tenScale, Slice result)
    {
        boolean round;
        do {
            int powerTen = Math.min(tenScale, MAX_POWER_OF_TEN_INT);
            tenScale -= powerTen;

            int divisor = POWERS_OF_TEN_INT[powerTen];
            round = divideCheckRound(decimal, divisor, result);
            decimal = result;
        }
        while (tenScale > 0);

        if (round) {
            incrementUnsafe(decimal);
        }
    }
private static void scaleDownTenRoundUp ( Slice decimal , int tenScale , Slice result ) { boolean round ; do { int powerTen = Math . min ( tenScale , MAX_POWER_OF_TEN_INT ) ; tenScale -= powerTen ; int divisor = POWERS_OF_TEN_INT [ powerTen ] ; round = divideCheckRound ( decimal , divisor , result ) ; decimal = result ; } while ( tenScale > 0 ) ; if ( round ) { incrementUnsafe ( decimal ) ; } }
Scale down the value for 10**tenScale (this := this / 5**tenScale). This
method rounds-up, eg 44/10=4, 44/10=5.