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.


On Dec 29, 2005, at 1:52 PM, Gabriel Dos Reis wrote:

Howard Hinnant <hhinnant@apple.com> writes:

| We seem to have already merged (perhaps incompletely) some parts of
| this very part of TR1 as if it was already standard.

I'm confused as to what you're referring to: the C++0x working paper
or the libstdc++ implementation?

Sorry for the ambiguous language.


I meant, assuming appropriate configure, that gcc 4 appears to have the following behavior:

#include <cmath>
#include <iostream>

int main()
{
// gcc 4 compiles and executes the following line as if sin (1.0). The C++03 standard
// says it should be ambiguous. TR1 says it should do what gcc 4 does.
std::cout << std::sin(1) << '\n';


// gcc 4 finds the following line ambiguous, in agreement with C+ +03, but in disagreement
// with TR1. This is despite the fact that gcc 4 has gone to some effort to disambiguate
// many other calls to atan2, in disagreement with C++03, but in agreement with TR1
std::cout << std::atan2(1.0F, 1.0) << '\n';


// gcc 4 compiles and executes the following line, in disagreement with C++03, but in
// agreement with TR1.
std::cout << std::signbit(1.0) << '\n';
}


Is there a clear policy for libstdc++ (gcc) for what parts of TR1 get adopted today as if they were already part of the standard? Or is it handled on a case-by-case basis using engineering judgement?

-Howard


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