[Issue 14206] New: cdouble is broken

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Feb 20 02:53:31 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14206

          Issue ID: 14206
           Summary: cdouble is broken
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: ilyayaroshenko at gmail.com

unittest {
    cfloat conj00(cfloat z) { return z.re - z.im*1fi; }
    assert(conj00(7+3i) == 7-3i);
    cfloat conj10(cfloat z) { return z.re - z.im*1i; }
    assert(conj10(7+3i) == 7-3i);
    cfloat conj20(cfloat z) { return z.re - z.im*1Li; }
    assert(conj20(7+3i) == 7-3i);
    cdouble conj01(cdouble z) { return z.re - z.im*1fi; }
    assert(conj01(7+3i) == 7-3i); //fails
    cdouble conj11(cdouble z) { return z.re - z.im*1i; }
    assert(conj11(7+3i) == 7-3i); //fails
    cdouble conj21(cdouble z) { return z.re - z.im*1Li; }
    assert(conj21(7+3i) == 7-3i);
    creal conj02(creal z) { return z.re - z.im*1fi; }
    assert(conj02(7+3i) == 7-3i);
    creal conj12(creal z) { return z.re - z.im*1i; }
    assert(conj12(7+3i) == 7-3i);
    creal conj22(creal z) { return z.re - z.im*1Li; }
    assert(conj22(7+3i) == 7-3i);
}

--


More information about the Digitalmars-d-bugs mailing list