Return a parsed float (javascript type number)
@return {Number} The parsed float
482275
function() {
	
      var str_value;
      
      // StringField getValue (handles typeInvite and trim options)
      str_value = inputEx.NumberField.superclass.getValue.call(this);
      
      // don't return NaN if empty field
      if (str_value === '') {
         return '';
      }
      
      return parseFloat(str_value);
   }
1231278
def getFloat(t):
    
    d = c_double()
    if PL_get_float(t, byref(d)):
        return d.value
    else:
        raise InvalidTypeError("float")
512081
def _parse_float(value, default=None):
    
    if value is None:
        return default
    try:
        return float(value)
    except ValueError:
        print "Couldn't cast value to `float`."
        return default
916642
function number()
    {
        const number = document.createElement('div')
        document.body.appendChild(number)
        number.innerHTML = rand(1000)
        number.style.fontSize = '300%'
        number.style.position = 'fixed'
        number.style.left = number.style.top = '50%'
        number.style.color = 'red'
        number.style.opacity = 1
        return number
    }
1148017
function N(a) {
    var t = typeof a;
    if (t === 'number') return a;
    if (t === 'undefined') return 0;
    if (t === 'null') return 0;
    try {
        var v = parseFloat(a);
        if (isNaN(v)) return 0;
        return v;
    }
    catch (e) {
        return 0;
    }
}
52608
def get_float(self, key, default=None):
        
        value = self.get(key, default)
        return None if value is None else float(value)
754205
function(str) {
            // determine if the string is a hex number by checking if it begins with '0x' or '-0x', in which case delegate to parseInt with a 16 radix
            if(/^( )*(0x|-0x)/.test(str)) {
                return parseInt(str, 16);
            }
            // if the number is not in decimal or scientific format, return NaN explicitly instead of letting JavaScript do its loose parsing
            if(!(/^[-+]?[0-9]*[.]?[0-9]*$/.test(str) || (/^[-+]?[0-9][.]?[0-9]*e[-+]?[1-9][0-9]*$/).test(str))) {
                return NaN;
            }
            return parseFloat(str);
        }
950963
function (mixed) {

            var type = typeof mixed;

            if (type === "boolean") {
                return +mixed;
            }

            mixed = "" + mixed;
            mixed = mixed.replace(/\s/g, "");
            mixed = mixed.replace(",", ".");
            mixed = (parseFloat(mixed) || 0);
            mixed = this.round(mixed, 9); // For numbers like "0.3000000004"

            return mixed;
        }
1014771
function cast(type, variable) {
		var result = variable;

		switch (type) {
			case 'number':
				result = +result;
				break;

			case 'int':
				result = parseInt(result, 10);
				break;

			case 'float':
				result = parseFloat(result);
				break;

			case 'bool':
			case 'boolean':
				result = ['true', '1', 1].indexOf(result) >= 0;
				break;
		}

		return result;
	}
1275373
function parseIntValue(input) {

    let value = input.buf.readInt32LE(input.i);
    input.i += 4;
    return value;
}
1277366
public static float coerceToFloat(Object value, float defaultValue) {
    if (value instanceof Float) {
      return (float) value;
    }
    if (value instanceof Number) {
      return ((Number) value).floatValue();
    } else if (value instanceof String) {
      try {
        return Float.valueOf((String) value);
      } catch (NumberFormatException ignored) {
      }
    }
    return defaultValue;
  }
1213972
function toFixed (num) {
  var int = parseFloat(num);
  if (isNaN(int)) {
    throw new Error('The "toFixed" helper must be passed a number-like value.');
  }
  return int.toFixed(2);
}
25547
function float32 (arr) {
	if (arr.length) {
		if (arr instanceof Float32Array) return arr
		var float = new Float32Array(arr)
		float.set(arr)
		return float
	}

	// number
	narr[0] = arr
	return narr[0]
}
839609
function parse(val) {
  if (typeof val === 'number' && !isNaN(val)) {
    return val;
  }

  if (typeof val !== 'string') {
    return null;
  }

  // Test if the string passed is valid
  var results = parseRegExp.exec(val);
  var floatValue;
  var unit = 'b';

  if (!results) {
    // Nothing could be extracted from the given string
    floatValue = parseInt(val, 10);
    unit = 'b'
  } else {
    // Retrieve the value and the unit
    floatValue = parseFloat(results[1]);
    unit = results[4].toLowerCase();
  }

  return Math.floor(map[unit] * floatValue);
}
887689
public float getFloat(int columnIndex) {
		Object fieldValue = data[columnIndex];
		if (fieldValue == null) {
			return 0.0f;
		}
		if (fieldValue instanceof Number) {
			return ((Number) fieldValue).floatValue();
		}
		throw new DBFException("Unsupported type for Number at column:" + columnIndex + " "
				+ fieldValue.getClass().getCanonicalName());
	}
517779
def toFloat(val):
    """"""
    hex = "0123456789abcdef"
    return float(hex.find(val[0]) * 16 + hex.find(val[1]))
874493
def ParseFloat(text):
  
  try:
    # Assume Python compatible syntax.
    return float(text)
  except ValueError:
    # Check alternative spellings.
    if _FLOAT_INFINITY.match(text):
      if text[0] == '-':
        return float('-inf')
      else:
        return float('inf')
    elif _FLOAT_NAN.match(text):
      return float('nan')
    else:
      # assume '1.0f' format
      try:
        return float(text.rstrip('f'))
      except ValueError:
        raise ValueError('Couldn\'t parse float: %s' % text)