Exponentiation function, e.
Exponentiation function, e.g. x^y
If base^exponent doesn't fit in a Long, the result will overflow (unlike scala.math.pow which will return +/- Infinity).
If this
SafeLong is backed by a Long and that
SafeLong is backed by
a Long as well, then f
will be called with both values.
If this
SafeLong is backed by a Long and that
SafeLong is backed by
a Long as well, then f
will be called with both values. Otherwise,
this
and that
will be converted to BigInt
s and g
will be called
with these BigInt
s.
Provides a type to do safe long arithmetic. This type will never overflow, but rather convert the underlying long to a BigInt as need and back down to a Long when possible.