List of utility methods to do Long Number Divide
long | divideLongBy1000(long l) divide Long By long mem = 0; mem = l / 1000; return mem; |
Long | divideLongs(Long a, Long b) divide Longs return new Long(a.longValue() / b.longValue()); |
long | divideZero(final long dividend, final long divisor, final long defaultDivisor) Divides a divident by divisor , with a default value if the divisor is zero. if (divisor == 0) { return dividend / defaultDivisor; return dividend / divisor; |
long | divWithRound(long p, long q) div With Round long div = p / q; long floor; long ceil; if (p >= 0) { floor = q * div; ceil = floor + q; return (ceil - p >= p - floor) ? div : div + 1; } else { ... |