[Issue 7268] Incorrect sign when raising negative number to even power.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 12 23:07:58 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7268


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2012-01-12 23:07:56 PST ---
This is correct.
http://d-programming-language.org/expression.html#UnaryExpression

>From priority of operators, (-10 ^^ 2) is translated to (-(10^^2)), so the
result is -(100) == -100.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list