Example usage for Java org.apache.commons.math.util MathUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
double | EPSILON Smallest positive number such that 1 - EPSILON is not numerically equal to 1. |
double | TWO_PI 2 π. |
long | binomialCoefficient(final int n, final int k) Returns an exact representation of the Binomial Coefficient, " n choose k ", the number of k -element subsets that can be selected from an n -element set. |
double | binomialCoefficientDouble(final int n, final int k) Returns a double representation of the Binomial Coefficient, "n choose k ", the number of k -element subsets that can be selected from an n -element set. |
int | compareTo(double x, double y, double eps) Compares two numbers given some amount of allowed error. |
double | cosh(double x) Returns the hyperbolic cosine of x. |
double | distance(double[] p1, double[] p2) Calculates the L2 (Euclidean) distance between two points. |
double | distance(int[] p1, int[] p2) Calculates the L2 (Euclidean) distance between two points. |
boolean | equals(float x, float y) Returns true iff they are strictly equal. |
boolean | equals(float[] x, float[] y) Returns true iff both arguments are null or have same dimensions and all their elements are equal as defined by #equals(float,float) . |
boolean | equals(double x, double y) Returns true iff both arguments are NaN or neither is NaN and they are equal This method considers that NaN == NaN . |
boolean | equals(double[] x, double[] y) Returns true iff both arguments are null or have same dimensions and all their elements are equal as defined by #equals(double,double) . |
boolean | equals(float x, float y, float eps) Returns true if both arguments are equal or within the range of allowed error (inclusive). |
boolean | equals(float x, float y, int maxUlps) Returns true if both arguments are equal or within the range of allowed error (inclusive). |
boolean | equals(double x, double y, double eps) Returns true if both arguments are equal or within the range of allowed error (inclusive). |
boolean | equals(double x, double y, int maxUlps) Returns true if both arguments are equal or within the range of allowed error (inclusive). |
boolean | equalsIncludingNaN(float x, float y, float eps) Returns true if both arguments are NaN or are equal or within the range of allowed error (inclusive). |
boolean | equalsIncludingNaN(float x, float y, int maxUlps) Returns true if both arguments are NaN or if they are equal as defined by #equals(float,float,int) equals(x, y, maxUlps) . |
boolean | equalsIncludingNaN(double x, double y, double eps) Returns true if both arguments are NaN or are equal or within the range of allowed error (inclusive). |
boolean | equalsIncludingNaN(double x, double y, int maxUlps) Returns true if both arguments are NaN or if they are equal as defined by #equals(double,double,int) equals(x, y, maxUlps . |
long | factorial(final int n) Returns n!. |
double | factorialDouble(final int n) Returns n!. |
double | factorialLog(final int n) Returns the natural logarithm of n!. |
int | gcd(final int p, final int q) Gets the greatest common divisor of the absolute value of two numbers, using the "binary gcd" method which avoids division and modulo operations. |
long | gcd(final long p, final long q) Gets the greatest common divisor of the absolute value of two numbers, using the "binary gcd" method which avoids division and modulo operations. |
int | hash(double value) Returns an integer hash code representing the given double value. |
int | hash(double[] value) Returns an integer hash code representing the given double array. |
int | lcm(int a, int b) Returns the least common multiple of the absolute value of two numbers, using the formula |
long | lcm(long a, long b) Returns the least common multiple of the absolute value of two numbers, using the formula |
double | log(double base, double x) Returns the logarithm for base |
double | normalizeAngle(double a, double center) Normalize an angle in a 2&pi wide interval around a center value. |
int | pow(final int k, int e) Raise an int to an int power. |
int | pow(final int k, long e) Raise an int to a long power. |
long | pow(final long k, int e) Raise a long to an int power. |
long | pow(final long k, long e) Raise a long to a long power. |
BigInteger | pow(final BigInteger k, int e) Raise a BigInteger to an int power. |
BigInteger | pow(final BigInteger k, long e) Raise a BigInteger to a long power. |
BigInteger | pow(final BigInteger k, BigInteger e) Raise a BigInteger to a BigInteger power. |
double | round(double x, int scale) Round the given value to the specified number of decimal places. |
float | round(float x, int scale) Round the given value to the specified number of decimal places. |
double | round(double x, int scale, int roundingMethod) Round the given value to the specified number of decimal places. |
float | round(float x, int scale, int roundingMethod) Round the given value to the specified number of decimal places. |
byte | sign(final byte x) Returns the sign for byte value x . |
double | sign(final double x) Returns the sign for double precision x . |
float | sign(final float x) Returns the sign for float value x . |
int | sign(final int x) Returns the sign for int value x . |
long | sign(final long x) Returns the sign for long value x . |
short | sign(final short x) Returns the sign for short value x . |