This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients
Date 2003-02-03.14:22:52
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
On Solaris 8, running Python 2.2.2, the built-in 
function long() gave me the following peculiar results
when applied to a floating-point argument.

(Unfortunately I don't have administrative access to
this machine, so couldn't test to see whether Python
2.3a has the same problems.)

s0100% uname -a
SunOS s0100.math.lsa.umich.edu 5.8 Generic_108528-14
sun4u sparc SUNW,Sun-Blade-1000
s0100% python
Python 2.2.2 (#22, Dec 23 2002, 12:02:55) 
[GCC 3.0.3] on sunos5
Type "help", "copyright", "credits" or "license" for
more information.
>>> long(3.1415)
0L
>>> _ == 0L
0
>>> long(6e20)
00000000000000000L
>>> _ - 1
37778931862957161709567L
>>> int(3.1415)
3
History
Date User Action Args
2007-08-23 14:10:42adminlinkissue679520 messages
2007-08-23 14:10:42admincreate