[Issue 7268] New: Incorrect sign when raising negative number to even power.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 10 21:59:02 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7268
Summary: Incorrect sign when raising negative number to even
power.
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: mail.mantis.88 at gmail.com
--- Comment #0 from mail.mantis.88 at gmail.com 2012-01-10 21:58:58 PST ---
dmd 2.057, windows
Raising negative number to even power results in a negative number, e.g.:
static assert( (-10 ^^ 2) != (-10 * -10) ); //pass
static assert( (-10 ^^ 2) == (-10 * -10) ); //Error: static assert (-100 ==
100) is false
--
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