This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug libstdc++/11706] std::pow(T, int) implementation pessimizescode
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 13 Nov 2003 22:52:40 +0100 (CET)
- Subject: Re: [Bug libstdc++/11706] std::pow(T, int) implementation pessimizescode
- References: <20030729120327.11706.rguenth@tat.physik.uni-tuebingen.de><20030929161707.29290.qmail@sources.redhat.com> <Pine.LNX.4.58.0311132230000.466@goofy>
On Thu, 13 Nov 2003, Richard Guenther wrote:
> On Mon, 29 Sep 2003, gdr at integrable-solutions dot net wrote:
>
> > | It is - see line 556 in <cmath> which unconditionally uses ::pow. The
> >
> > It is a bug, feel free to submit a due PR :-)
Btw. shouldn't std_cmath.h get an overhaul as we have a lot more builtin
math functions now? Like fabs() uses
inline float
fabs(float __x)
{ return __builtin_fabsf(__x); }
but floor()
#if _GLIBCXX_HAVE_FLOORF
inline float
floor(float __x) { return __gnu_cxx::__c99_binding::floorf(__x); }
#else
inline float
floor(float __x) { return ::floor(static_cast<double>(__x)); }
#endif
but of course __bultin_floor() is available now. Same goes for many other
functions declared here.
Richard.