Re: Signed zeros: is this a bug?
- From: "Mark Dickinson" <dickinsm@xxxxxxxxx>
- Date: 11 Mar 2007 10:33:29 -0700
On Mar 11, 1:21 pm, Duncan Booth <duncan.bo...@xxxxxxxxxxxxxxx> wrote:
Tim Peters wrote inhttp://blog.gmane.org/gmane.comp.python.devel/day=20050409:
All Python behavior in the presence of a NaN, infinity, or signed zero
is a platform-dependent accident. This is because C89 has no such
concepts, and Python is written to the C89 standard. It's not easy to
fix across all platforms (because there is no portable way to do so in
standard C), although it may be reasonably easy to fix if all anyone
cares about is gcc and MSVC (every platform C compiler has its own set
of gimmicks for "dealing with" these things).
Understood. Platform dependent is fine. But does this really excuse
results
like the following?
-3.14159265359from math import atan2
x = -0.; print atan2(0., -1.)
3.14159265359print atan2(0., -1.)
Mark
.
- References:
- Signed zeros: is this a bug?
- From: Mark Dickinson
- Re: Signed zeros: is this a bug?
- From: Dan Bishop
- Re: Signed zeros: is this a bug?
- From: Terry Reedy
- Re: Signed zeros: is this a bug?
- From: Mark Dickinson
- Re: Signed zeros: is this a bug?
- From: Duncan Booth
- Signed zeros: is this a bug?
- Prev by Date: Re: Signed zeros: is this a bug?
- Next by Date: Re: Signed zeros: is this a bug?
- Previous by thread: Re: Signed zeros: is this a bug?
- Next by thread: Re: Signed zeros: is this a bug?
- Index(es):