[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Welcome C++11!
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Welcome C++11! |
Date: |
Fri, 14 Dec 2012 08:50:23 -0500 |
On 13 December 2012 23:45, Ed Meyer <address@hidden> wrote:
> that did it, but now it fails 2 tests involving pow. With the old
> std i^2 yields -1 exactly because the implementation of pow in
> /usr/include/c++/4.7/complex accounts for the fact that 2 is an even
> integer; it's wrapped with #ifndef __GXX_EXPERIMENTAL_CXX0X__ The
> new pow just does a polar(y*cos(log(x)), y*sin(log(x))) which
> because of roundoff leaves a tiny value (1.2e-16) in the imag part.
>
> I suppose realpow.m should check the imag part and cast the result
> to real if it is tiny instead of returning an error - what do you
> think?
Could this reasonably be considered a bug in the libstdc++
implementation? It sounds like they removed a check for even numbers
for no reason?
- Jordi G. H.
- Re: Welcome C++11!, (continued)
- Re: Welcome C++11!, Jordi Gutiérrez Hermoso, 2012/12/13
- Re: Welcome C++11!, Júlio Hoffimann, 2012/12/13
- Re: Welcome C++11!, Jordi Gutiérrez Hermoso, 2012/12/13
- Re: Welcome C++11!, Jordi Gutiérrez Hermoso, 2012/12/13
- Re: Welcome C++11!, Júlio Hoffimann, 2012/12/13
- Re: Welcome C++11!, John W. Eaton, 2012/12/13
- Re: Welcome C++11!, Thomas Weber, 2012/12/13
- Re: Welcome C++11!, Ed Meyer, 2012/12/13
- Re: Welcome C++11!, Júlio Hoffimann, 2012/12/13
- Re: Welcome C++11!, Ed Meyer, 2012/12/13
- Re: Welcome C++11!,
Jordi Gutiérrez Hermoso <=
- Re: Welcome C++11!, Ed Meyer, 2012/12/14
- Re: Welcome C++11!, Ed Meyer, 2012/12/14
- Re: Welcome C++11!, Júlio Hoffimann, 2012/12/26