KBig Math
Mathematical utility functions for KBigDecimal and KBigInteger. Provides advanced mathematical operations not available in the basic interfaces.
Functions
Calculates the factorial of a KBigInteger (n!). The factorial of n is the product of all positive integers less than or equal to n.
Calculates the greatest common divisor (GCD) of two KBigIntegers using Euclid's algorithm. The GCD is the largest positive integer that divides both numbers without remainder.
Checks if a KBigInteger is a prime number using trial division. A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.
Calculates the least common multiple (LCM) of two KBigIntegers. The LCM is the smallest positive integer that is divisible by both numbers.
Calculates the power of a KBigInteger raised to another KBigInteger exponent using binary exponentiation. This method efficiently computes base^exponent.
Calculates the square root of a KBigDecimal using Newton's method for iterative approximation.