Where are std::sinf( float ) etc.
Gabriel Dos Reis
gdr@integrable-solutions.net
Thu Dec 29 04:57:00 GMT 2005
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
More information about the Libstdc++
mailing list