Where are std::sinf( float ) etc.

Ed Smith-Rowland 3dw4rd@verizon.net
Thu Dec 29 04:42:00 GMT 2005


I know that this is somewhat of a user question but it also impinges on 
the library implementation.

As I read it, C++ is supposed to have C99 compatible math functions such as:
  float std::sinf( float );
  long double std::sinl( long double );
  float std::cosf( float );
  long double std::cosl( long double );
  etc.
in addition to the usual unsuffixed overloads for float, double, and 
long double.

This is based on statements in the standard to the effect that C++ is 
supposed
to implement the corresponding C99 standard.  I can't remember chapter 
and verse.  :-P

I Googled around and saw c_shadow that had these but was later removed.

In addition, TR1 is very clear that the new C99 math functions in 
section 8.16.1 such as
double acosh(double x);
float acoshf(float x);
long double acoshl(long double x);
have these suffixed versions

So my questions are:

Where did these go?  Did I just miss them?

Should we create a tr1 version of std_cmath.h that has these new functions?

It was looking at the TR1 draft that got me onto this.

Thanks,

Ed



More information about the Libstdc++ mailing list