[Patch] libstdc++/20352

Paolo Carlini pcarlini@suse.de
Mon Mar 14 20:06:00 GMT 2005


Hi,

this PR points out that non-c99 platforms don't guarantee that
atan2(0, +0) == 0. The proposed solution leads also to improved
consistency in the behavior of the various cplx pow overloads
for null base and exponent. To wit, on c99 platforms (exploiting
the builtins) all the overloads the same value, typically (f.i.,
for glibc) (nan, nan); on non-c99 platforms, that is using the
open coded implementation, (0, 0), consistently.

The price is an additional conditional in the involved overload
for non-c99 platforms, but hopefully, this case will become
less and less frequent in the future.

Tested x86-linux, also undef-ing _GLIBCXX_USE_C99_COMPLEX.

I will wait until tomorrow, in case of issues.

Paolo.

P.S. There is a minor risk that, a platform that we consider
_GLIBCXX_USE_C99_COMPLEX may have a broken atan2, that is not
conforming to F.9.1.4. In that case we can only improve the
autoconf tests for _GLIBCXX_USE_C99_COMPLEX. Seems a largely
independent issue, however.

/////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_20352
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050314/55b82f1f/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_20352
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050314/55b82f1f/attachment-0001.ksh>


More information about the Libstdc++ mailing list