[Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c (original) (raw)
Mark Dickinson dickinsm at gmail.com
Sat Jun 28 00:50:35 CEST 2008
- Previous message: [Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c
- Next message: [Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Jun 27, 2008 at 8:02 PM, Guido van Rossum <guido at python.org> wrote:
Now that I've learned about the hex float format supported by C++ and Java, I wonder if it wouldn't be better to support conversion to and from that format and nothing else.
By the way, this particular format is also recommended by the draft versions of IEEE 754r that I've seen: section 7.12.2 of draft version 1.2.5 (this is publicly available---there's a link from the wikipedia 754r page) says:
"""Implementations supporting binary formats shall provide conversions between all supported internal binary formats and external hexadecimal character sequences. External hexadecimal character sequences for finite numbers are of the form specified by C99 subclauses: 6.4.4.2 floating constants, 20.1.3 strtod, 7.19.6.2 fscanf (a, e, f, g), and 7.19.6.1 fprintf (a, A)."""
More recent 754r drafts spell the grammar out explicitly instead of referring to C99, and weaken the 'shall' (i.e., 'is required to') to a 'should' ('is recommended to').
Mark
- Previous message: [Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c
- Next message: [Python-Dev] [Python-checkins] r64424 - in python/trunk:Include/object.h Lib/test/test_sys.py Misc/NEWSObjects/intobject.c Objects/longobject.c Objects/typeobject.cPython/bltinmodule.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]