Re: Signed zeros: is this a bug?
- From: "Terry Reedy" <tjreedy@xxxxxxxx>
- Date: Sun, 11 Mar 2007 12:13:36 -0400
"Dan Bishop" <danb_83@xxxxxxxxx> wrote in message
news:1173629090.993914.55570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| On Mar 11, 9:31 am, "Mark Dickinson" <dicki...@xxxxxxxxx> wrote:
| > I get the following behaviour on Python 2.5 (OS X 10.4.8 on PowerPC,
| > in case it's relevant.)
| >
| > >>> x, y = 0.0, -0.0
| > >>> x, y
| > (0.0, 0.0)
| > >>> x, y = -0.0, 0.0
| > >>> x, y
| >
| > (-0.0, -0.0)
|| IIRC, float.__repr__ just does whatever libc does. Have you tried
| using printf("%g, %g", 0.0, -0.0) in a C program?
Detailed FP behavior like this is system (and yes, libc) dependent. On
WinXP
IDLE 1.1.3
(0.0, 0.0)x,y = 0.0, -0.0
x,y
(0.0, 0.0)x,y = -0.0, 0.0
x,y
0.0-0.0
Terry Jan Reedy
.
- Follow-Ups:
- Re: Signed zeros: is this a bug?
- From: Mark Dickinson
- Re: Signed zeros: is this a bug?
- References:
- Signed zeros: is this a bug?
- From: Mark Dickinson
- Re: Signed zeros: is this a bug?
- From: Dan Bishop
- Signed zeros: is this a bug?
- Prev by Date: Re: Parsing Indented Text (like parsing Python)
- Next by Date: Re: PIL: reading bytes from Image
- Previous by thread: Re: Signed zeros: is this a bug?
- Next by thread: Re: Signed zeros: is this a bug?
- Index(es):