(self)
return man * 2.**exp
Return value as Python float.
Return value as Python float.
Return value as Python float .
def to_value(self):
        """Return value as Python float."""
        exp = bytearray(self._buffer)[-1] - self._bias
        if exp == -self._bias:  # pylint: disable=invalid-unary-operand-type
            return 0.
        # unpack as unsigned long int
        man = struct.unpack(self._intformat, bytearray(self._buffer)[:-1] + b'\0')[0]
        # prepend assumed bit and apply sign
        if man & self._signmask:
            man = -man
        else:
            man |= self._signmask
        return man * 2.**exp
def to_value ( self ) : exp = bytearray ( self . _buffer ) [ - 1 ] - self . _bias if exp == - self . _bias : # pylint: disable=invalid-unary-operand-type return 0. # unpack as unsigned long int man = struct . unpack ( self . _intformat , bytearray ( self . _buffer ) [ : - 1 ] + b'\0' ) [ 0 ] # prepend assumed bit and apply sign if man & self . _signmask : man = - man else : man |= self . _signmask return man * 2. ** exp