EXPT -0.05^0.78 produces NaN (Exception InvalidOperands)
-
EXPT -0.05^0.78 produces NaN (Exception InvalidOperands)
Hello,
In Mervis 2.4.1 EXPT block produces NaN (Exception InvalidOperands) for IN1 = -0.05 and IN2 = 0.78.
I think that this behavior is not correct -0.05^0.75 = -0.097.
Have a nice day
Jan -
(-0.05)^(0.75) is equal to the "4th root of (-0.05)^3"=2th root of (2th root of (-0.000125))=2rd root of (0.011*i) where "i" is a complex number operand. The 2th root for a complex number is not defined in mathematics and as such, not in Mervis. That's why you get NAN.
-
@HPC
Ok, you are right. My fault... I checked -(0.05)^0.78 instead of (-0.05)^0.78The Mervis behavior is correct.
Thank you
JanP.S. Maybe it will be great to add this information into documentation. Now there is IN1 ANY_REAL which seems to me that also negative numbers are accepted.
-