IBM integer and double formats
Mark Dickinson
dickinsm at gmail.com
Tue Nov 11 04:15:44 EST 2008
On Nov 10, 11:49 pm, John Machin <sjmac... at lexicon.net> wrote:
> Call me crazy if you like, but I'd name that function IEEEtoIBM.
But it's topsy-turvy day! Didn't you get the memo?
Oh, all right. IEEEtoIBM it is.
> That's a hexadecimal representation in lowercase with no leading
> zeroes ... variable length and lowercase doesn't seem very IBM to me.
True. Replace "%x" with "%016X" for fixed-length uppercase. Or as you
say, bytes output is probably more natural. I was guessing that the
OP
wants to write the converted float out to an ASCII file, in hex.
Mark
More information about the Python-list
mailing list