Float and EFloat types

The EGL Float type is a value type that lets you create a 64-bit double-precision floating-point value. In Eclipse IDE for EGL Developers, the type definition for Float is EFloat.

EGL package name

eglx.lang

Example use
Type detail
In the following detail, the Operation annotation indicates that the specified operation is available. For example, use “==” to compare two values, not “$EQ”. Two exceptions are the widen and narrow operations, which are invoked during data conversions; for example, when the as operator is used.
externalType EFloat extends ENumber type ClassType
/**
	 * {@Operation +} A unary plus (has no effect on the numeric value).
	 */
static function $Plus(value EFloat in) returns (EFloat) {@Operation{"+"}};

/**
	 * {@Operation +} Adds two numbers.
	 */
static function $Plus(lvalue EFloat in, rvalue EFloat in) 
       returns (EFloat) {@Operation{"+"}};

	/**
	 * {@Operation -} Negates the value.
	 */
static function $Minus(value EFloat in) 
        returns (EFloat) {@Operation{"-"}};

	/**
	 * {@Operation -} Subtracts one number from another.
	 */
static function $Minus(lvalue EFloat in, rvalue EFloat in) 
       returns (EFloat) {@Operation{"-"}};

	/**
	 * {@Operation *} Multiplies two numbers.
	 */
static function $Multiply(value EFloat in, rvalue EFloat in) 
       returns (EFloat) {@Operation{"*"}};

/**
	 * {@Operation /} Divides one number by another.
	 */
static function $Divide(value EFloat in, rvalue EFloat in) 
       returns (EFloat) {@Operation{"/"}};

/**
	 * {@Operation %} Computes the remainder of dividing one number by another.
	 */
static function $Modulo(lvalue EFloat in, rvalue EFloat in) 
       returns (EFloat) {@Operation{"%"}};

	/**
	 * {@Operation **} Computes lvalue to the power of rvalue.
	 */
static function $PowerOf(value EFloat in, rvalue EFloat in) 
       returns (EFloat) {@Operation{"**"}};

/**
	 * {@Operation <} Compares two numbers.
	 */
static function $LT(lvalue EFloat in, rvalue EFloat in) 
       returns (EBoolean) {@Operation{"<"}};

/**
	 * {@Operation >} Compares two numbers.
	 */
static function $GT(lvalue EFloat in, rvalue EFloat in) 
       returns (EBoolean) {@Operation{">"}};

	/**
	 * {@Operation <=} Compares two numbers.
	 */
static function $LTE(lvalue EFloat in, rvalue EFloat in) 
       returns (EBoolean) {@Operation{"<="}};

/**
	 * {@Operation >=} Compares two numbers.
	 */
static function $GTE(lvalue EFloat in, rvalue EFloat in) 
       returns (EBoolean) {@Operation{">="}};

/**
	 * {@Operation ==} Compares two numbers.
	 */
static function $EQ(lvalue EFloat in, rvalue EFloat in)
       returns(EBoolean) {@Operation{"=="}};

/**
	 * {@Operation !=} Compares two numbers.
	 */
static function $NEQ(lvalue EFloat in, rvalue EFloat in) 
       returns(EBoolean) {@Operation{"!="}};
	
/**
	 * {@Operation narrow} Converts a string to a float.  The string is parsed
	 * as follows: It may begin with an optional + or - sign.  After the sign there
	 * must be a sequence of one or more digit characters.  They may be followed by
	 * a decimal point (a period) and one or more digit characters.  It may end with
	 * an exponent, which is the letter e or E, followed by an optional negative sign,
	 * followed by one or more digit characters.
	 *
	 * @throws TypeCastException if the string can't be parsed into a float.
	 */
static function asFloat(value EString in) 
       returns(EFloat) {@Operation{"narrow"}};

static function asFloat(value ESmallint in) 
       returns(EFloat) {@Operation{"widen"}};

static function asFloat(value ESmallfloat in) 
       returns(EFloat) {@Operation{"widen"}};

static function asFloat(value EDecimal in) 
       returns(EFloat) {@Operation{"widen"}};

static function asFloat(value EInt in) 
       returns(EFloat) {@Operation{"widen"}};

static function asFloat(value EBigint in) 
       returns(EFloat) {@Operation{"narrow"}};

static function asFloat(value ENumber in) 
       returns(EFloat) {@Operation{"narrow"}};

static function asNumber(value EFloat in) 
       returns(ENumber) {@Operation{"widen"}};

end
Comments

In Java output, positive values range from 4.9e-324 to 1.7976931348623157e308.

Compatibility
Table 1. Compatibility
Target Issue
Java No issues.
JavaScript No issues.