This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Change libgfortran from scalbn to ldexp


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]