Java org.apache.commons.math3.util ArithmeticUtils fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.math3.util ArithmeticUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.math3.util ArithmeticUtils.

The text is from its open source code.

Method

longbinomialCoefficient(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.
doublebinomialCoefficientDouble(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.
doublebinomialCoefficientLog(final int n, final int k)
Returns the natural log of the Binomial Coefficient, " n choose k ", the number of k -element subsets that can be selected from an n -element set.
longfactorial(final int n)
Returns n!.
doublefactorialLog(final int n)
Compute the natural logarithm of the factorial of n .
intgcd(int p, int q)
Computes the greatest common divisor of the absolute value of two numbers, using a modified version of the "binary gcd" method.
longgcd(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.

booleanisPowerOfTwo(long n)
Returns true if the argument is a power of two.
intlcm(int a, int b)

Returns the least common multiple of the absolute value of two numbers, using the formula lcm(a,b) = (a / gcd(a,b)) * b .

longlcm(long a, long b)

Returns the least common multiple of the absolute value of two numbers, using the formula lcm(a,b) = (a / gcd(a,b)) * b .

intmulAndCheck(int x, int y)
Multiply two integers, checking for overflow.
longmulAndCheck(long a, long b)
Multiply two long integers, checking for overflow.
intpow(final int k, int e)
Raise an int to an int power.
intpow(final int k, long e)
Raise an int to a long power.
longpow(final long k, int e)
Raise a long to an int power.
longpow(final long k, long e)
Raise a long to a long power.
BigIntegerpow(final BigInteger k, int e)
Raise a BigInteger to an int power.
BigIntegerpow(final BigInteger k, long e)
Raise a BigInteger to a long power.
BigIntegerpow(final BigInteger k, BigInteger e)
Raise a BigInteger to a BigInteger power.