pow

fun pow(base: KBigInteger, exponent: KBigInteger): KBigInteger

Calculates the power of a KBigInteger raised to another KBigInteger exponent using binary exponentiation. This method efficiently computes base^exponent.

Return

The result of base raised to the power of exponent

Parameters

base

The base KBigInteger

exponent

The exponent KBigInteger (must be non-negative)

Throws

if the exponent is negative