This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Change libgfortran from scalbn to ldexp
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: GCC Fortran mailing list <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 3 Oct 2004 10:15:54 +0000 (UTC)
- Subject: Re: [gfortran] Change libgfortran from scalbn to ldexp
- References: <415FCAD6.20105@physik.uni-muenchen.de>
On Sun, 3 Oct 2004, [ISO-8859-1] Tobias Schlüter wrote:
> We're seeing some system dependency in whether set_exponent works or not, more
> precisely intrinsic_set_exponent.f90 fails on powerpc-linux and maybe other
> platforms. Since I don't know the exact failure mode, I had a brief look at
> the implementation, and saw that we use the 'scalbn' library function, which
> seems to be non-standard according to the documentation I have available.
> Furthermore, there is a standard function which is supposed to do exactly the
> same, namely 'ldexp'. So I replaced all occurences of scalbn{f} with ldexp{f}
> and verified that the library still builds and passes its tests on i686-linux.
ldexp is C90, scalbn is C99. ldexp multiplies by a power of 2, scalbn by
a power of FLT_RADIX.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
http://www.srcf.ucam.org/~jsm28/gcc/#c90status - status of C90 for GCC 4.0
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)