Convert a number from GDSII 8 byte real format to float.

    Parameters
    ----------
    value : string
        The GDSII binary string representation of the number.

    Returns
    -------
    out : float
        The number represented by ``value``.
196544
def _eight_byte_real_to_float(value):
    
    short1, short2, long3 = struct.unpack('>HHL', value)
    exponent = (short1 & 0x7f00) // 256 - 64
    mantissa = (((short1 & 0x00ff) * 65536 + short2) * 4294967296 +
                long3) / 72057594037927936.0
    if short1 & 0x8000:
        return -mantissa * 16.**exponent
    return mantissa * 16.**exponent
1221240
def _float_or_str(value):
    
    # remove any surrounding quotes
    value = QUOTE_REGEX.sub('', value)
    try:  # attempt `float()` conversion
        return float(value)
    except ValueError:  # just return the input
        return value
1226244
def float_format(self, value):
        """"""
        if isinstance(value, str):
            # Duck-test the format string; raise ValueError on fail
            '{0:{1}}'.format(1.23, value)

            self._float_format = value
        else:
            raise TypeError('Floating point format code must be a string.')
1343807
def parse_value(self, value):
        
        value = value.strip()

        # Skip missing sensors
        if value == 'na':
            return None

        # Try just getting the float value
        try:
            return float(value)
        except:
            pass

        # Next best guess is a hex value
        try:
            return float.fromhex(value)
        except:
            pass

        # No luck, bail
        return None
517779
def toFloat(val):
    """"""
    hex = "0123456789abcdef"
    return float(hex.find(val[0]) * 16 + hex.find(val[1]))
723456
def _to_numeric(val):
    
    if isinstance(val, (int, float, datetime.datetime, datetime.timedelta)):
        return val
    return float(val)
602354
def positivefloat(value):
    
    f = float(not_empty(value))
    if f < 0:
        raise ValueError('float %s < 0' % f)
    return f
400341
def str_val(val):
    
    str_val = val
    if val is None:
        str_val = "NA"
    elif type(val) == float:
        str_val = '%0.2f' % val
    else:
        str_val = str(val)
    return str_val
21653
def get_as_float(self, key):
        
        value = self.get(key)
        return FloatConverter.to_float(value)
870753
def value_to_python(self, value):
        
        if not isinstance(value, bytes):
            raise tldap.exceptions.ValidationError("should be a bytes")
        value = value.decode("utf_8")
        return value
541799
def convert_float(value, parameter):
    '''
    
    '''
    value = _check_default(value, parameter, ( '', '-', None ))
    if value is None or isinstance(value, float):
        return value
    try:
        return float(value)
    except Exception as e:
        raise ValueError(str(e))
1116414
def encode(self, value):
        """"""
        if isinstance(value, bytes):
            return value
        elif isinstance(value, int):
            value = b(str(value))
        elif isinstance(value, float):
            value = b(repr(value))
        elif not isinstance(value, str):
            value = str(value)
        if isinstance(value, str):
            value = value.encode()
        return value
1245156
def decimal_from_string(value)
      Float(value)
      BigDecimal(value, digits)
    rescue ArgumentError
      raise InvalidValueError, "Given value: #{value.inspect}"
    end
1226153
def _send_float(self,value):
        

        # convert to float. this will throw a ValueError if the type is not 
        # readily converted
        if type(value) != float:
            value = float(value)

        # Range check
        if value > self.board.float_max or value < self.board.float_min:
            err = "Value {} exceeds the size of the board's float.".format(value)
            raise OverflowError(err)

        return struct.pack(self.board.float_type,value)
74141
def convert(self, value, view):
        
        if isinstance(value, NUMERIC_TYPES):
            return value
        else:
            self.fail(
                u'must be numeric, not {0}'.format(type(value).__name__),
                view,
                True
            )
657710
public static float getFloat(
    Object      value)
  {
    if (value == null)
    {
        return 0;
    }

    return Float.valueOf(value.toString()).floatValue();
  }
1333396
def _float(value):
    
    if "[" in value:
        # There is a unit field
        value, sep, unit = value.partition("[")
        unit = sep + unit

        # As defined in the CCSDS Orbital Data Message Blue Book, the unit should
        # be the same as defined in table 3-3 which are for km and km/s for position and
        # velocity respectively. Thus, there should be no other conversion to make
        if unit in ("[km]", "[km/s]"):
            multiplier = 1000
        elif unit == "[s]":
            multiplier = 1
        else:
            raise ValueError("Unknown unit for this field", unit)
    else:
        # if no unit is provided, the default is km, and km/s
        multiplier = 1000

    return float(value) * multiplier