[Issue 7006] std.math.pow (integral, integral) crashes on negative exponents

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 28 05:17:51 PST 2011


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



--- Comment #2 from timon.gehr at gmx.ch 2011-11-28 05:16:50 PST ---
That is like saying 1/2 should give a div by zero error because the result does
not fit in an integer and therefore it must always indicate a bug.

I want this:

assert(a ^^ -1 == 1/a);

This is only div by zero if a is zero.


(BTW: This does not give a div by zero error on my x86 machine, and I have no
clue why you think it should: void main(){auto x = -1; x = x/(x-int.max);})

-- 
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