Just ran into a complex number problem by taking t...
# mathematics
t
Just ran into a complex number problem by taking the cubed root of a negative number
(-4.0).pow(1.0/3.0)
, which returns
NaN
due to lack of support for imaginary numbers. However, Java has
Math.cbrt()
specifically for this purpose. Is this something Kotlin should explicitly support?
v
b.pow(x)
is
NaN
for
b < 0
and
x
is finite and not an integer
Even without support for complex numbers, library function
pow
must understand
x
as not an integer, I think