Fractional power of negative numbers enclosed in parentheses

print -0.5^2.1
  -0.233258print (-0.5)^2.1
  NaNprint (-0.5)^2.0
  0.25print -0.5^2.0
  -0.25

I am getting a NaN for calculating the fractional power of a negative number if the number is enclosed in a parenthesis, which is rather weird. If the exponent is an integer, the behavior is intended. Please see above snippet from the Igor Pro command window. I'm running on Igor Pro 8.04 (Build 34722) with MacOS 15.5.

I would appreciate any suggestions to solve this issue.

I think this behavior is correct, since, in essence, you are producing a complex number but the standard print is real. See:

print/C (-0.5)^2.1
  (0.221842,0.0720808)

 

You can read about Igor's operators and their precedence: DisplayHelpTopic "Operators"