Format a <tt>float</tt>.
196220
public FormatStringBuffer format(long l) {

        Format fmt = getFormat();

        if (fmt.type != DECIMAL) throw new IllegalArgumentException("Expected a float format");

        // Decide padding character.
        char pad = ' ';
        if ((fmt.flags & ZEROPAD) == ZEROPAD) {
            pad = '0';
        }

        // Convert number to String.
        String str;
        String prefix = "";
        switch (fmt.base) {
            case 8:
                str = Long.toOctalString(l);
                if ((fmt.flags & SPECIAL) == SPECIAL) {
                    fmt.fieldWidth -= 1;
                    prefix = "0";
                }
                break;
            case 16:
                str = Long.toHexString(l);
                if ((fmt.flags & SPECIAL) == SPECIAL) {
                    fmt.fieldWidth -= 2;
                    prefix = "0x";
                }
                break;
            default:
                str = String.valueOf(Math.abs(l));
                break;
        }

        if ((fmt.flags & LARGE) == LARGE) {
            str = str.toUpperCase();
            prefix = prefix.toUpperCase();
        }

        int len = str.length();

        if (l < 0 || (fmt.flags & PLUS) == PLUS) {
            fmt.fieldWidth--;
        }

        // Place the sign character first if zero padding.
        if ((fmt.flags & ZEROPAD) == ZEROPAD) {
            if (l < 0 && fmt.base == 10) {
                buffer.append('-');
            } else if ((fmt.flags & PLUS) == PLUS && fmt.base == 10) {
                buffer.append('+');
            }
            buffer.append(prefix);
        }

        // Pad.
        if ((fmt.flags & LEFT) != LEFT) while (len < fmt.fieldWidth--)
            buffer.append(pad);

        // Place the sign character now if not zero padding.
        if ((fmt.flags & ZEROPAD) != ZEROPAD) {
            if (l < 0 && fmt.base == 10) {
                buffer.append('-');
            } else if ((fmt.flags & PLUS) == PLUS && fmt.base == 10) {
                buffer.append('+');
            }
            buffer.append(prefix);
        }

        for (int i = 0; i < len; ++i)
            buffer.append(str.charAt(i));

        while (len < fmt.fieldWidth--)
            buffer.append(' ');

        return this;
    }
1086717
function float(value) {
  var parsedFloat = Number.parseFloat(value);

  // couldn't parse it
  if (typeOf(parsedFloat) != 'number') {
    return throwModifierError('float', value, {message: 'Invalid Float'});
  }

  return parsedFloat;
}
491154
public static String writeFloat(Float value) {
		if (value==null) return null;
		
		return Float.toString(value);			
	}
1103859
def _cast_float(self, value):
        """"""
        try:
            return float(value)
        except ValueError:
            msg.err("Cannot convert {} to float for line {}.".format(value, self.identifier))
            exit(1)
181528
def parse_float_literal(ast, _variables=None):
    """"""
    if isinstance(ast, (FloatValueNode, IntValueNode)):
        return float(ast.value)
    return INVALID
656489
def _value_format(self, value):
        """"""
        return super(VerticalPyramid, self)._value_format(value and abs(value))
71980
public void writeFloat(float value) throws UnsupportedEncodingException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeFloat", new Float(value));
    getBodyList().add(new Float(value));
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "writeFloat");
  }
1075674
def p_ConstValue_float(p):
  """"""
  p[0] = model.Value(type=model.Value.FLOAT, value=p[1])
863897
def floatformat(fmt_string):
    
    fmt_defaults = scientificformat.__defaults__
    scientificformat.__defaults__ = (fmt_string,) + fmt_defaults[1:]
    try:
        yield
    finally:
        scientificformat.__defaults__ = fmt_defaults
327776
public final void mFLOAT() throws RecognitionException {
		try {
			int _type = FLOAT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// druidG.g:728:10: ( ( NUM )* '.' ( NUM )+ )
			// druidG.g:728:15: ( NUM )* '.' ( NUM )+
			{
			// druidG.g:728:15: ( NUM )*
			loop43:
			while (true) {
				int alt43=2;
				int LA43_0 = input.LA(1);
				if ( ((LA43_0 >= '0' && LA43_0 <= '9')) ) {
					alt43=1;
				}

				switch (alt43) {
				case 1 :
					// druidG.g:
					{
					if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
						input.consume();
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;

				default :
					break loop43;
				}
			}

			match('.'); 
			// druidG.g:728:24: ( NUM )+
			int cnt44=0;
			loop44:
			while (true) {
				int alt44=2;
				int LA44_0 = input.LA(1);
				if ( ((LA44_0 >= '0' && LA44_0 <= '9')) ) {
					alt44=1;
				}

				switch (alt44) {
				case 1 :
					// druidG.g:
					{
					if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
						input.consume();
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;

				default :
					if ( cnt44 >= 1 ) break loop44;
					EarlyExitException eee = new EarlyExitException(44, input);
					throw eee;
				}
				cnt44++;
			}

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
1326252
def read_plain_float(file_obj, count):
    """"""
    return struct.unpack("<{}f".format(count).encode("utf-8"), file_obj.read(4 * count))
542066
@NonNull
    public Parameters setFloat(@NonNull String name, float value) {
        return setValue(name, value);
    }
1268567
def write_float(self, number):
        
        buf = pack(self.byte_order + "f", number)
        self.write(buf)
920798
public JBBPOut Float(final float... value) throws IOException {
    assertNotEnded();
    assertArrayNotNull(value);
    if (this.processCommands) {
      for (final float f : value) {
        _writeFloat(f);
      }
    }
    return this;
  }
114851
def _f90complex(self, value):
        """"""
        return '({0:{fmt}}, {1:{fmt}})'.format(value.real, value.imag,
                                               fmt=self.float_format)
18838
def format_item(x, timedelta_format=None, quote_strings=True):
    """"""
    if isinstance(x, (np.datetime64, datetime)):
        return format_timestamp(x)
    if isinstance(x, (np.timedelta64, timedelta)):
        return format_timedelta(x, timedelta_format=timedelta_format)
    elif isinstance(x, (str, bytes)):
        return repr(x) if quote_strings else x
    elif isinstance(x, (float, np.float)):
        return '{0:.4}'.format(x)
    else:
        return str(x)
1231278
def getFloat(t):
    
    d = c_double()
    if PL_get_float(t, byref(d)):
        return d.value
    else:
        raise InvalidTypeError("float")