>> 1.8E+308 == 1.#INF >> -1.8E+308 == -1.#INF
Float! values are 64-bit positive and negative numbers that contain a decimal point.
Floats span a range from
Floats return #INF on overflow by design.
Dividing 0.0 by 0.0 results in
Float! is a member of the following typesets:
2. Literal syntax
Zero or more digits, followed by a dot
., followed by one or more digits.
A comma can be used in place of the dot for the decimal point.
|A formed value will normalize a decimal comma to a decimal point as the decimal mark.|
- immediately before the first digit indicates the positive or negative sign of the
Leading zeros are ignored.
>> +00123.4 == 123.4
' is used as a place value separator for large values, and can appear anywhere after the first digit.
>> 60'000'12'3.4 == 60000123.4
A single quote
' immediately before or after the decimal point will raise an error.
>> 60'000'123'.4 *** Syntax Error: invalid integer! at "60'000'123'.4" *** Where: do *** Stack: load
>> 60'000'123.'4 *** Syntax Error: invalid integer! at "60'000'123.'4" *** Where: do *** Stack: load
All comparators can be applied on
=, ==, <>, >, <, >=, <=, =?. In addition,
max are also supported.
A float value can be converted at runtime to
string! by using a
|The digits after the decimal point will be discarded when converting a float to an integer. No rounding will take place.|
>> to integer! 123.4 == 123 >> to string! 123.4 == "123.4"
integer! are combined in an expression, the result will be a
>> 123.4 * 42 == 5182.8
5. Testing values
float? to check if a value is of the
>> float? 123.4 == true
type? to return the datatype of a given value.
>> type? 123.4 == float!