This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Base.convert | |
bitstype 64 IBMFloat64 | |
# ibm float format is hex based: | |
# * bit 1 = sign | |
# * bits 2-8 = exponent to the power of 16, with bias of 64 | |
# * bits 9-64 = mantissa: no implied leading 1 (unlike ieee), | |
# typically normalised (hex of bits 9-12 is non-zero), though this need | |
# not be the case |