------- Comment #12 from dominiq at lps dot ens dot fr  2008-03-05 20:45 -------
I have reported the bug to Apple, it is radar 5782719 with the following test:

[ibook-dhum] f90/bug% cat nist_827_c.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
int main() {
    double avd, bvd, cvd, dvd, dvcorr;
    cvd = 10.0;
    dvd = 6.0;
    dvd = log10(cvd) - 2.0/(exp(dvd)+1.0);
    avd = dvd - tanh(3.0);
    if (abs(avd) > 0.5e-9)
       {
         printf("fails\n");
         printf("avd=%g, should be 0.0\n", avd);
         printf("%g, %g\n", log10(cvd), exp(dvd));
       }
    else printf("pass\n");
}
[ibook-dhum] f90/bug% gcc -m64 nist_827_c.c
[ibook-dhum] f90/bug% a.out
fails
avd=-1, should be 0.0
0, 0.995067
[ibook-dhum] f90/bug% gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking
-enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35285

Reply via email to