Return double-precision IEEE float values when reading single-precision IBM floats to prevent loss of precision.

This commit is contained in:
Robert Smallshire
2015-01-30 14:36:35 +01:00
parent f8c298a971
commit e56eefbd2c
+1 -1
View File
@@ -454,7 +454,7 @@ def unpack_ibm_floats(data, count):
Returns:
A sequence of floats.
"""
return array('f', (ibm2ieee(data[i: i+4]) for i in range(0, count * 4, 4)))
return array('d', (ibm2ieee(data[i: i+4]) for i in range(0, count * 4, 4)))
def unpack_values(buf, count, item_size, fmt, endian='>'):