LDC 0.11.0 has been released!
bearophile
bearophileHUGS at lycos.com
Sun Jul 28 10:39:18 PDT 2013
Maybe I have found some more problems. The program:
import core.stdc.stdio, std.math;
void test(in double nLoops) nothrow {
double rsin = 0.0;
double rtan = 0.0;
double i = 0.0;
while (i < nLoops) {
rsin = sin(i);
rtan = tan(i);
i++;
}
printf("i: %f\n", i);
printf("sin: %f\n", rsin);
printf("tan: %f\n", rtan);
}
void main() {
test(2_000_000);
}
DMD seems to print the correct values:
i: 2000000.000000
sin: -0.989602
tan: 6.880292
The program compiled with ldmd2 (on a 32 bit Windows system, with
no switches) crashes when it tries to print "i". If I comment out
the printf line of "i" then the program prints:
sin: -0.000000
tan: nan
Bye,
bearophile
More information about the digitalmars-d-ldc
mailing list