src/main/java/ognl/OgnlOps.java
public static Number newReal(int type, double value)
    {
        if (type == FLOAT) return new Float((float) value);
        return new Double(value);
    }
public static Number newReal(int type, double value)
    {
        if (type == FLOAT) return new Float((float) value);
        return new Double(value);
    }
public static Number newReal ( int type , double value ) { if ( type == FLOAT ) return new Float ( ( float ) value ) ; return new Double ( value ) ; }
Returns a new Number object of an appropriate type to hold the given real value. The type of
the returned object is always either Float or Double, and is only Float if the given type tag
(a constant from the NumericTypes interface) is FLOAT.

@param type
the nominal numeric type of the result, a constant from the NumericTypes interface
@param value
the real value to convert to a Number object
@return a Number object with the given value, of type implied by the type argument
Returns a new Number object of an appropriate type to hold the given real value . The type of the returned object is always either Float or Double and is only Float if the given type tag ( a constant from the NumericTypes interface ) is FLOAT .