Possible std.math.exp() bug
anthony.difranco at yale.edu
anthony.difranco at yale.edu
Mon Apr 3 18:34:53 PDT 2006
Ideas? Help much appreciated; this is a huge obstacle right now. Have
reproduced this on two different x86 linux systems. Nothing special about 3.0
in reproducing this. Have verified that the corresponding C library exp()
works.
real tgamma(real x);
The Gamma function, Γ(x)
$ cat test.d
import std.math;
int main(char[][] args)
{
printf("f(3.0) %f\n", sqrt(3.0));
printf("g(3.0) %f\n", exp(3.0));
printf("h(3.0) %f\n", tgamma(3.0));
return 1;
}
$ dmd test.d
gcc test.o -o test -lphobos -lpthread -lm
$ ./test
f(3.0) 1.732051
g(3.0) -0.000000
h(3.0) -0.000000
$ dmd
Digital Mars D Compiler v0.150
Copyright (c) 1999-2006 by Digital Mars written by Walter Bright
Documentation: www.digitalmars.com/d/index.html
More information about the Digitalmars-d-bugs
mailing list