octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Marc Glisse
Subject: Re: round-off error in std::pow(std::complex<T>, double) in C++11
Date: Fri, 25 Jan 2013 15:10:45 +0100 (CET)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

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

On 24 January 2013 22:31, Gabriel Dos Reis <address@hidden> wrote:
On Thu, Jan 24, 2013 at 8:02 PM, Ed Meyer <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]