This is the mail archive of the gcc@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]

Re: Bug in libm or libstdc++.


>	Uhhh... if you're referring to page 660 (section 22.3)
>	it most certainly does not make any such guarantee with
>	regards to -long double- datatypes.

S22.3, page 661: "double atan (double) ..... In addition, <cmath> and
<math.h> supply these functions for float and long double arguments."

You're wrong, I'm right. Long double versions of atan and friends ARE
demanded by the standard. I would like to see them very soon so that I may
use them (the long double versions anyways) when I want that bit of extra
precision.......

>	at least on my box (sparc solaris), libm is vendor provided.

Not on an IBM PC clone, where it comes with the DJGPP/Cygwin/whatever
development environment you install. I installed the DJGPP/EGCS development
environment and got a broken libm.

>	gnu/include/g++/cmath -does- make reference to the math
>	functions that use long doubles for arguments, but I don't
>	think any library on my box actually supports them.

Then those libraries are broken and not conformant. I suggest you complain
to the vendor. You may also want to ask the bookstore where you got your
copy of Stroustrup for an exchange or a refund; I sure would have if my
copy had turned out to have pp. 661-662 torn out or missing.

Anyways, since these are function overloads in C++, I would expect the long
double and float versions to be in libstdc++, not libm. And libstdc++ comes
with gcc/egcs rather than being vendor supplied, on all platforms. If the
egcs libstdc++ is lacking long double overloads for atan and the like, then
this is a bug in egcs.


-- 
   .*.  "Clouds are not spheres, mountains are not cones, coastlines are not
-()  <  circles, and bark is not smooth, nor does lightning travel in a
   `*'  straight line."    -------------------------------------------------
        -- B. Mandelbrot  |http://surf.to/pgd.net
_____________________ ____|________     Paul Derbyshire     pderbysh@usa.net
Programmer & Humanist|ICQ: 10423848|


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