[Issue 10927] Power of complex number causes an internal error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 12 07:57:25 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=10927


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE, pull
                 CC|                            |yebblies at gmail.com


--- Comment #2 from yebblies <yebblies at gmail.com> 2013-11-13 02:57:22 EST ---
constfold's Pow is completely broken for complex numbers - it assumes
everything not integral is floating point.  It calculates the power on the real
part only, then produces a RealExp with type Tcomplex64, hence the ice.

This also fails:

static assert( (1+2i) ^^ 3 == -11 - 2i );
testx.d(3): Error: static assert  (1.00000 == (-11+-2i)) is false

https://github.com/D-Programming-Language/dmd/pull/2751

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


More information about the Digitalmars-d-bugs mailing list