Java com.google.common.math LongMath fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.math LongMath fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.math LongMath.

The text is from its open source code.

Method

longbinomial(int n, int k)
Returns n choose k , also known as the binomial coefficient of n and k , or Long#MAX_VALUE if the result does not fit in a long .
longcheckedAdd(long a, long b)
Returns the sum of a and b , provided it does not overflow.
longcheckedMultiply(long a, long b)
Returns the product of a and b , provided it does not overflow.
longcheckedPow(long b, int k)
Returns the b to the k th power, provided it does not overflow.
longcheckedSubtract(long a, long b)
Returns the difference of a and b , provided it does not overflow.
longdivide(long p, long q, RoundingMode mode)
Returns the result of dividing p by q , rounding using the specified RoundingMode .
booleanisPowerOfTwo(long x)
Returns true if x represents a power of two.
intlog2(long x, RoundingMode mode)
Returns the base-2 logarithm of x , rounded according to the specified rounding mode.
longmean(long x, long y)
Returns the arithmetic mean of x and y , rounded toward negative infinity.
intmod(long x, int m)
Returns x mod m , a non-negative value less than m .
longmod(long x, long m)
Returns x mod m , a non-negative value less than m .
longpow(long b, int k)
Returns b to the k th power.