mirror of
https://github.com/wassname/segpy.git
synced 2026-08-20 12:50:51 +08:00
Fixed obvious problem with IBM float conversion.
This commit is contained in:
@@ -892,7 +892,7 @@ def ibm2Ieee(ibm_float):
|
||||
(C) Secchi Angelo
|
||||
with thanks to Howard Lightstone and Anton Vredegoor.
|
||||
"""
|
||||
I = struct.unpack('>I',ibm_float)[0]
|
||||
i = struct.unpack('>I',ibm_float)[0]
|
||||
sign = [1,-1][bool(i & 0x100000000L)]
|
||||
characteristic = ((i >> 24) & 0x7f) - 64
|
||||
fraction = (i & 0xffffff)/float(0x1000000L)
|
||||
|
||||
Reference in New Issue
Block a user