rem

operator fun rem(divisor: Long): Long

The remainder of this / divisor truncated toward zero, as Kotlin's % on Long defines it: the result has this value's sign and is smaller than divisor in magnitude, so it always fits in a Long. It is what Euclid's algorithm needs to take a gcd of a 128-bit value.

Throws

if divisor is zero, as Long % 0 does.