This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: Where are std::sinf( float ) etc.


Ed Smith-Rowland <3dw4rd@verizon.net> writes:

| 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:

No, neither C98 nor C++03 are supposed to have C99 compatible math
functions. 

|   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.

I can't find anything like that from §26.5 of the C++ standard text. 

| This is based on statements in the standard to the effect that C++ is
| supposed
| to implement the corresponding C99 standard.

Which C++ 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

TR1 is not part of the standard (yet) and we still have to dig out
which part of TR1 will be merged into C+0x.

-- Gaby


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