Package com.kraken.api.util
Class MathUtils
- java.lang.Object
-
- com.kraken.api.util.MathUtils
-
public class MathUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MathUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longmodInverse(long val)Computes the inverse mod given a value and bits to shift left bystatic java.math.BigIntegermodInverse(java.math.BigInteger val, int bits)Computes the inverse mod given a value and bits to shift left by
-
-
-
Method Detail
-
modInverse
public static java.math.BigInteger modInverse(java.math.BigInteger val, int bits)Computes the inverse mod given a value and bits to shift left by- Parameters:
val- BigInteger valuebits- int number of bits to shift left- Returns:
- Mod inverse of the value passed.
-
modInverse
public static long modInverse(long val)
Computes the inverse mod given a value and bits to shift left by- Parameters:
val- BigInteger value- Returns:
- Mod inverse of the value passed.
-
-