Write float.

@param value the value
@return the string
491154
public static String writeFloat(Float value) {
		if (value==null) return null;
		
		return Float.toString(value);			
	}
984622
public static float getFloat(JSONValue value) {
        if (value == null)
            return 0;
        if (!(value instanceof Number))
            throw new JSONException(NOT_A_NUMBER);
        return ((Number)value).floatValue();
    }
1094554
def comma(value):
    
    try:
        if float(value) == _round(float(value), 0):
            output = "{:,}".format(int(value))
        else:
            output = "{:,}".format(float(value))
    except Exception:
        output = text_type(value)

    return output
433774
public static String getValueLabel(final Object value) {
        if (value == null) {
            return NULL_LABEL;
        }

        if (value instanceof HasLabelAdvice) {
            final String suggestedLabel = ((HasLabelAdvice) value).getSuggestedLabel();
            if (!Strings.isNullOrEmpty(suggestedLabel)) {
                return suggestedLabel;
            }
        }

        // format decimals
        if (value instanceof Double || value instanceof Float || value instanceof BigDecimal) {
            final NumberFormat format = NumberFormat.getNumberInstance();
            final String result = format.format((Number) value);
            logger.debug("Formatted decimal {} to: {}", value, result);
            return result;
        }

        // format dates
        if (value instanceof Date) {
            final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
            final String result = format.format((Date) value);
            logger.debug("Formatted date {} to: {}", value, result);
            return result;
        }

        return getLabel(value.toString());
    }
1258042
def serialize(self, value):
        
        if isinstance(value, float) and self.as_type is six.text_type:
            value = u'{0:.{1}f}'.format(value, self.float_places)
            value = self.as_type(value)
        elif self.as_type is six.text_type:
            if isinstance(value, bool):
                # Store bools as 1/0 instead of True/False.
                value = six.text_type(int(bool(value)))
            elif isinstance(value, bytes):
                value = value.decode('utf-8', 'ignore')
            else:
                value = six.text_type(value)
        else:
            value = self.as_type(value)

        if self.suffix:
            value += self.suffix

        return value
383246
public static float sortableIntToFloat(int value)
    {
        value = value ^ (value >> 31) & Integer.MAX_VALUE;
        return Float.intBitsToFloat(value);
    }
711626
public static String writeDouble(Double value) {
		if (value==null) return null;
		
		return Double.toString(value);			
	}
1099423
protected String stringValue(COSBase value)
    {
        if (value instanceof COSString)
            return ((COSString) value).getString();
        else if (value instanceof COSNumber)
            return String.valueOf(((COSNumber) value).floatValue());
        else
            return "";
    }
1362983
public static float asFloat(ModelNode value, float defaultValue) {
        return Double.valueOf(value.asDouble(defaultValue)).floatValue();
    }
430379
public function serialize($value) : string
    {
        if (!is_numeric($value)) {
            throw InvalidValueException::valueDoesNotMatchType($this, $value);
        }

        return (string) (float) $value;
    }
676273
public static function format(float $value) : string
    {
        $formatter = new NumberFormatter(self::translator()->getIETF(), NumberFormatter::DECIMAL);

        return $formatter->format($value);
    }
895262
public Expression<Float> eq(float value) {
		String valueString = "'" + value + "'";
		return new Expression<Float>(this, Operation.eq, valueString);
	}
1143661
public JsonWriter valueLiteral(CharSequence value) {
        startValue();

        if (value == null) {
            writer.write(kNull);
        } else {
            writer.write(value.toString());
        }
        return this;
    }
551026
public void put(Float value) {
		if (value == null) {
			this.compiledStatement.bindNull(compiledStatementBindIndex++);
		} else {
			compiledStatement.bindDouble(compiledStatementBindIndex++, (float) value);
		}
	}
203699
public StringTextValue<String> setValue(final Integer value)
	{
		final String percentFormatted = getPercentFormatted(value);
		return setValue(percentFormatted);
	}
922078
protected Float convertFloat(String value, String unit, int unary)
			throws IllegalArgumentException {

		try {
            if (unit != null)
            {
    			// trim & lowercase
    			value = value.trim().toLowerCase();
    			// trim units from value
                if (value.endsWith(unit))
                    value = value.substring(0, value.length() - unit.length());
            }

			return Float.parseFloat(value) * unary;
		} catch (NumberFormatException e) {
			throw new IllegalArgumentException(
					"Invalid number format " + value, e);
		} catch (NullPointerException e) {
			throw new IllegalArgumentException("Invalid null format");
		}
	}
756459
public Serializer writeString(String value) throws IOException {
        if (null == value) return writeNull();

        writer.write('"');

        char[] chars = value.toCharArray();

        for (int i=0; i<chars.length; i++)
        {
            char c = chars[i];
            switch (c)
            {
                case  '"': writer.write("\\\""); break;
                case '\\': writer.write("\\\\"); break;
                case    0: writer.write("\\u0000"); break;
                case '\b': writer.write("\\b"); break;
                case '\t': writer.write("\\t"); break;
                case '\n': writer.write("\\n"); break;
                case '\f': writer.write("\\f"); break;
                case '\r': writer.write("\\r"); break;
                case '/': writer.write("\\/"); break;
                default:
                    if ((c >= 32) && (c <= 126))
                    {
                        writer.write(c);
                    }
                    else
                    {
                        writer.write("\\u");
                        writer.write(rightAlignedZero(Integer.toHexString(c),4));
                    }
            }
        }

        writer.write('"');

        return this;
    }