This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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: Problem with non-ISO C scalb() builtin


On Tue, 2003-09-23 at 16:46, Kaveh R. Ghazi wrote:
> Er, I don't think it is a gcc bug.  The glibc headers on my RH box as
> well as math.h on solaris2.7 & irix6.5 and the xopen standard all
> describe scalb as taking two doubles.  It is scalbn (with an "n") that
> takes a double and an int.  See:

This appears to be a case where we have conflicting prior
implementations, and thus ISO C called the function scalbn instead so as
not to conflict with existing implementations.

When I looked at this, I checked the IEEE FP standard, which recommends
having a scalb (double,int) function in the C library.  I also did "info
libc", and then "CTRL-S scalb".  The manual says the second argument of
scalb is an int.  Looking at the actual header file, I now see that it
is scalb (double, double).  I was mislead by the docs.  I don't know if
the manual has always been wrong, or if the prototype changed sometime
in the past.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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