[erlang-bugs] Math library defect?
Matthew Dempsky
matthew@REDACTED
Thu May 15 19:11:46 CEST 2008
2008/5/15 John Haugeland <stonecypher@REDACTED>:
> I believe I have found a defect in the math library.
Erlang's math:pow function is implemented using the C math library's
pow(3) function. Try compiling and running this program to test:
$ cat > test.c <<EOF
#include <math.h>
#include <stdio.h>
int main()
{
printf("%f\n", pow(2.0, 57.0) - 2 * pow(2.0, 56.0));
return 0;
}
EOF
$ cc -o test test.c -lm
$ ./test
0.000000
More information about the erlang-bugs
mailing list