If you use -ansi to compile a program that uses the atanh function, the compiler somehow replaces atanh with a function that just returns 0. I think the compiler should either put in the correct atanh function or refuses to link/compile. The following shows how to reproduce the bug:
$ cat > bug.c #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { printf("atanh(%f) returns %f!\n",.32,atanh(.32)); return 0;} $ gcc bug.c -o bug.exe -lm && bug.exe atanh(0.320000) returns 0.331647! $ gcc -ansi bug.c -o bug.exe -lm && bug.exe atanh(0.320000) returns 0.000000! -- Summary: compiling with -ansi puts in broken version of atanh Product: gcc Version: 3.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: anonymous at mailinator dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27413