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.
-
A AVsetula locked this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login