[Python-bugs-list] [ python-Bugs-814290 ] int() weirdness (Python 2.3.1, GCC 3.3.1)

SourceForge.net noreply at sourceforge.net
Tue Sep 30 09:05:16 EDT 2003


Bugs item #814290, was opened at 2003-09-29 17:08
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=814290&group_id=5470

Category: Python Interpreter Core
Group: Python 2.3
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Andrew Church (achurch)
Assigned to: Nobody/Anonymous (nobody)
Summary: int() weirdness (Python 2.3.1, GCC 3.3.1)

Initial Comment:
int() is behaving very strangely for me:

>>> int(42)

42

>>> int(42.5)

0

>>> int(429.777407345)

17126444324755L



What could cause this?  This is from a compile from

source using GCC 3.3.1; turning optimization on or off

does not seem to affect it (-O0, -O2, -O3 all tried).

----------------------------------------------------------------------

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-09-30 23:05

Message:
Logged In: YES 
user_id=29957

Since it's a glibc bug, closing this bug.



----------------------------------------------------------------------

Comment By: Andrew Church (achurch)
Date: 2003-09-29 18:21

Message:
Logged In: YES 
user_id=527960

i386 (really Pentium 4), glibc 2.2.5.



I think I've located the problem: modf() from libm is

returning bogus values, so this looks like a glibc bug, not

a Python bug.

----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-09-29 18:09

Message:
Logged In: YES 
user_id=29957

Which platform is this on? Also if it's a linux machine,

which version of libc is it using?



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=814290&group_id=5470



More information about the Python-bugs-list mailing list