This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: round-off error in std::pow(std::complex<T>, double) in C++11


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++.

- Jordi G. H.


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