Where are std::sinf( float ) etc.

Geoffrey Keating geoffk@geoffk.org
Mon Jan 2 21:18:00 GMT 2006


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:

> Howard Hinnant <hhinnant@apple.com> writes:
> 
> | 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 see; thanks.  In my original message, I was answering claims that
> C++ was required to be C99 compatible and absence of overloads for
> std::cosf. 
> 
> [...]
> 
> | 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?
> 
> TR1 implementations go into <tr1/>.
> 
> In this specific case, it appears to me that you're operating under
> the (mistaken) assumption that we selectively merged the C99 math part
> of TR1 into the libstdc++.  The C99 math stuff particularly hit
> libstdc++ long before TR1 was initiated or completed (have to dig to
> see the exact dates).  The work was mostly contributed by Loren (hi!)
> and you can enable/disable them with configure options (which did not
> say tr1, but C99 :-).  And there has been some controversy along the way.
> 
> Don't judge old facts based on new legislations.
> (retroactive laws are harmful :-)
> 
> [ You will find some requests to add more of those C99 functions in the
> bugzilla database. ]
> 
> As to overloads for std::cosf (note the suffix), I find the
> justificaton for them as "C99 compatibility" as dubious.  

Eek!  Please don't overload std::cosf to do anything other than call
cosf(), or std::cosl to do anything other than call cosl().  Some
users will be calling cosf() or cosl() intentionally, for performance
(for the first) or accuracy (for the second) reasons, and will be
surprised if cos() gets called.



More information about the Libstdc++ mailing list