Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Feb 2003 02:16:39 +0900 (JST)
From:      shudo@computer.org
To:        java@FreeBSD.ORG
Subject:   Re: Math.pow bug for jdk1.3.1-p8 ?
Message-ID:  <20030216.021639.424242874.shudo@localhost>
In-Reply-To: <20030216.005020.894433699.shudo@localhost>
References:  <20030215.175421.1015281127.shudo@localhost> <20030216014802.A10817@misty.eyesbeyond.com> <20030216.005020.894433699.shudo@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > It is certain that there is a problem around fdlibm, FreeBSD's gcc
> > > 2.95.4 or how the fdlibm compiled (compiler flags?).
> >
> > Sounds like its quite possibly due to problems with optimisation.
> > Obviously, java_g uses no optimisation when compiling,

> Next thing we can do to track the cause down is to compile e_pow.c,
> w_sqrt.c, e_sqrt.c, s_fabs.c, s_scalbn.c and s_copysign.c with
> different compiler options (-O0, -O2 and so on) and see the result of
> the ieee754_pow() function.

I could confirm that ieee754_pow() in e_pow.c produces wrong results
when it is compiled by FreeBSD's GCC 2.95.4 with "-O2" option.
If "-O0 -g" is supplied, the function works correctly.

This may be a bug of the GCC.

Interestingly, GCC 3.2 distributed with Red Hat Linux 8.0 has this bug,
too.

  % gcc -v
  Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
  Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
  Thread model: posix
  gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

I will summarize a procedure to reproduce this problem.


  Kazuyuki Shudo	shudo@computer.org	http://www.shudo.net/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030216.021639.424242874.shudo>