List of utility methods to do Double Number mod
long | mod(double a, double b) A modulo function suitable for our purpose. return (long) (a - b * Math.floor(a / b)); |
double | mod(double a, double b) Modulus double operator. int n = (int) (a / b); a -= n * b; if (a < 0.0) { a += b; return (a); |
float | Mod(double arg1, double arg2) The FORTRAN mod function if (arg2 == 0) return (float) arg1; int quo = (int) (arg1 / arg2); return (float) (arg1 - arg2 * quo); |
double | mod(double i, final double n) mod i = 0 <= i ? i % n : (n - (-i % n)) % n; assert 0 <= i && i < n; return i; |
long | mod(double left, double right) mod validateInput(left, right); return (long) (left - right * (long) Math.floor(left / right)); |
double | mod(double m, double n) Modular arithmetic: m mod n double result = m % n; return result < 0 ? result + n : result; |
double | mod(double n, double d) mod return n - d * Math.floor(n / d);
|
double | mod(double number, double mod) mod if (Math.abs(mod) <= Double.MIN_NORMAL) { return 0; if (number < 0) { return mod(number + mod, mod); } else if (number >= mod) { return mod(number - mod, mod); } else { ... |
double | mod(double value, double mod) mod if (value < 0 || mod <= 0) throw new IllegalArgumentException("value must be >= 0"); int index = (int) (value / mod); value -= mod * index; if (value < 0) return 0; else if (value >= mod) return 0; ... |
double | mod(double x, double m) Returns the non-negative remainder of x / m. return ((x % m) + m) % m;
|