Reading a non-standard floating point format

Cameron Laird claird at
Fri Apr 25 18:38:53 CEST 2003

In article <mailman.1051286382.24604.python-list at>,
Tim Peters  < at> wrote:
>> While I think I can see the way to do this with various bit-grubbing
>> techniques, the potential for error is massive, esp considering my non
>> comp-sci background.
>Post a link to a definition of this format, and I bet someone will help.
>> Does anyone know of a library in python or even (fairly) easily
>> wrappable C that might let me specify the format in a more high level
>> way?
>Precise English will translate into Python easily enough <wink>.

It's true that getting floating-point formats correct
to the far-right bit is, in general, tedious; Fidtz
shows good instincts in his caution about that prospect.

The bad news is that, no, there are no widely-applicable
parametrizations of the range of interesting floating-
point formats.  This remains an area of "craftwork".
Learn to use a hand-chisel, or find someone who will do
so for you.

Cameron Laird <Cameron at>

More information about the Python-list mailing list