Java Number Divide divmod256(byte[] number58, int startAt)

Here you can find the source of divmod256(byte[] number58, int startAt)

Description

divmod

License

Open Source License

Declaration

private static byte divmod256(byte[] number58, int startAt) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static byte divmod256(byte[] number58, int startAt) {
        int remainder = 0;
        for (int i = startAt; i < number58.length; i++) {
            int digit58 = (int) number58[i] & 0xFF;
            int temp = remainder * 58 + digit58;
            number58[i] = (byte) (temp / 256);
            remainder = temp % 256;/*ww  w. j  ava 2 s  .  c om*/
        }
        return (byte) remainder;
    }
}

Related

  1. divideAndRoundDown(long number, long divisor)
  2. divideBy(Number number1, Number number2)
  3. divideByRoundDown(Number number1, Number number2)
  4. division(Number numerator, Number denominator)
  5. divmod(byte[] number, int firstDigit, int base, int divisor)
  6. divRate(double v1, double v2)
  7. isDivisible(Double a, int b, int decimal)