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

           Summary: cannot evaluate ylog2x at compile time
           Product: D
           Version: 2.041
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bary...@smp.if.uj.edu.pl


--- Comment #0 from Witold Baryluk <bary...@smp.if.uj.edu.pl> 2010-01-28 
12:19:56 PST ---
import std.stdio;
import std.math;

double iter(double x) {
    static immutable a = log(4.0);
    return x*a;
}

void main() {
    writefln("%s", iter(5.0));
}


/usr/include/d/dmd2-posix/phobos/import/std/math.d(1415): Error: cannot
evaluate yl2x(x,0xb.17217f7d1cf79acp-4L) at compile time
aaaa.d(6): Error: cannot evaluate log(4L) at compile time
aaaa.d(6): Error: cannot evaluate log(4L) at compile time


This also means that currently DMD compiler will not perform constant folding
on a.

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

Reply via email to