Feel free to close if this is intentional, but currently the floating-point version of pow returns NaN for e.g. Double.pow(-1, 2.0), even though that's not complex. Shouldn't we be checking for Int(exactly: y) != nil? This appears to be the behavior of Darwin.pow(-1, 2.0).
Feel free to close if this is intentional, but currently the floating-point version of
pow
returnsNaN
for e.g.Double.pow(-1, 2.0)
, even though that's not complex. Shouldn't we be checking forInt(exactly: y) != nil
? This appears to be the behavior ofDarwin.pow(-1, 2.0)
.