round-off error in std::pow(std::complex<T>, double) in C++11

Marc Glisse marc.glisse@inria.fr
Fri Jan 25 14:11:00 GMT 2013


On Fri, 25 Jan 2013, Jordi Gutiérrez Hermoso wrote:

> On 24 January 2013 22:31, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
>> On Thu, Jan 24, 2013 at 8:02 PM, Ed Meyer <eem2314@gmail.com> wrote:
>>> On the other hand I think it is a bad idea to write code that depends on
>>> a particular implementation or rounding behaviour
>>
>> How *concretely* to do you propose to avoid that?  Are you suggesting
>> something to the programmers or to the implementers?
>
> He's saying, I think, that we shouldn't expect calls like pow(3.0, 2)
> to have no round-off error for any implementation of pow, so we should
> code around that possible round-off error. I myself think that since
> GNU's C++11 implementation is the only one we've seen with round-off
> error here, that this can reasonably be considered a bug in libstdc++.

I filed this PR:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56106

Feel free to add extra information.

-- 
Marc Glisse



More information about the Libstdc++ mailing list