[issue10925] Document pure Python version of integer-to-float correctly-rounded conversion

2011-10-23 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 117d51d3dd7d by Mark Dickinson in branch 'default':
Issue #10925: Add equivalent pure Python code for the builtin int-to-float 
conversion to test_long.
http://hg.python.org/cpython/rev/117d51d3dd7d

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10925
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10925] Document pure Python version of integer-to-float correctly-rounded conversion

2011-10-23 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10925
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10925] Document pure Python version of integer-to-float correctly-rounded conversion

2011-10-22 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Thanks for the comments.  Here's an updated patch, that actually makes use of 
the pure Python version to test the built-in int-to-float conversion.

--
versions:  -Python 2.7, Python 3.2
Added file: http://bugs.python.org/file23495/pure_python_long_to_float_v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10925
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10925] Document pure Python version of integer-to-float correctly-rounded conversion

2011-01-21 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I see there is already something similar for true division.

I find
+q_max, shift_max = 1  sig_bits, sys.float_info.max_exp - sig_bits
easier to read as two lines
+q_max = 1  sig_bits
+shift_max = sys.float_info.max_exp - sig_bits

Not having precedence memorized, I prefer added parens here:
+ ...  (n  shift) | bool(n  (1  shift) - 1)

I presume that for normal production testing, you would comment out
+   float = long_to_float

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10925
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10925] Document pure Python version of integer-to-float correctly-rounded conversion

2011-01-17 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

It would be helpful (perhaps to developers of alternative implementations) to 
give a pure Python version of correctly-rounded long-to-float conversion.  
Attached is such a version, as a patch to test_long in the release27-maint 
branch.

--
assignee: mark.dickinson
files: pure_python_long_to_float.patch
keywords: patch
messages: 126398
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: Document pure Python version of integer-to-float correctly-rounded 
conversion
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20423/pure_python_long_to_float.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10925
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10925] Document pure Python version of integer-to-float correctly-rounded conversion

2011-01-17 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
components: +Tests
type:  - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10925
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com