This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: 11706 vs ([lno] Canonical iv creation)


Richard Guenther wrote:

I'm curious to how the standard actually defines std::pow()s accuracy here though. I know we're not optimizing ::pow(x, 4) to the above without -ffast-math because of accuracy concerns. So how does std::pow() relate to ::pow in terms of accuracy guarrantees?

Really interesting issue...


Anyway, from a practical point of view I'm not really worried, since:

1- Glibc uses internally the very same algorithm, at least on x86 (just
   checked).

2- Which requires O(log n) multiplications and is discussed by Knuth in
   Sec. 4.6.3 of the second volume. You can find it almost *everywhere*,
   for instance also in SGI's power.

Paolo.


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