python / cpython

The Python programming language
https://www.python.org
Other
63.37k stars 30.33k forks source link

Bad float->long conversion on openbsd/sparc #39251

Closed 7eac24ac-7cd4-49e4-8bbf-f3999798505b closed 21 years ago

7eac24ac-7cd4-49e4-8bbf-f3999798505b commented 21 years ago
BPO 808286

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = created_at = labels = ['interpreter-core'] title = 'Bad float->long conversion on openbsd/sparc' updated_at = user = 'https://bugs.python.org/bescoto' ``` bugs.python.org fields: ```python activity = actor = 'bescoto' assignee = 'none' closed = True closed_date = None closer = None components = ['Interpreter Core'] creation = creator = 'bescoto' dependencies = [] files = [] hgrepos = [] issue_num = 808286 keywords = [] message_count = 2.0 messages = ['18201', '18202'] nosy_count = 1.0 nosy_names = ['bescoto'] pr_nums = [] priority = 'normal' resolution = 'duplicate' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue808286' versions = ['Python 2.3'] ```

7eac24ac-7cd4-49e4-8bbf-f3999798505b commented 21 years ago
$ uname -srvpm
OpenBSD 3.3 GENERIC#0 sparc64 SUNW,UltraSPARC-IIi @ 333
MHz, version 0 FPU
$ ./python  
Python 2.3 (#1, Sep 17 2003, 21:15:45) 
[GCC 2.95.3 20010125 (prerelease, propolice)] on openbsd3
Type "help", "copyright", "credits" or "license" for
more information.
>>> long(1000.0)
0L
>>> long(1000000.0)
00000L
>>> 32767 < long(1000000.0) < 32768
1
7eac24ac-7cd4-49e4-8bbf-f3999798505b commented 21 years ago

Logged In: YES user_id=218965

Oops, accidentally double posted somehow