Next: Integer Numbers, Previous: Scalars, Up: Scalars [Contents][Index]
LUX offers the following numerical data types:
BYTE
A byte
number requires 8 bits of storage, and can have any
integer value between 0 and 255 (#max_byte
– #max_byte –
inclusive).
inclusive.
WORD
A word
number requires 16 bits of storage, and can have any
integer value between -32768 (#min_word
–
#min_word) and +32767 (#max_word
– #max_word)
inclusive.
LONG
A long
number requires 32 bits of storage, and can have any
integer value between -2147483648 (#min_long
–
#min_long) and +2147483647 (#max_long
– #max_long)
inclusive.
INT64
An int64
number requires 64 bits of storage, and can have any
integer value between -9223372036854775808 (#min_int64
– #min_int64) and +9223372036854775807 (#max_int64
–
#max_int64)
inclusive.
FLOAT
A float
number requires four bytes of storage, and has a
single-precision floating-point value. The meaning of "single
precision" depends on the way that floating-point numbers are
represented inside your computer. On all computers, these values have
at least 6 significant digits, and may have a magnitude at least as
large as
and at least as small as (when larger than zero)
The largest absolute value representable on your machine as a
float
is equal to #max_float
(#max_float). The
smallest representable non-zero absolute value is equal to
#min_float
(#min_float).
On machines that comply with the IEEE 754-1985 standard for binary
floating-point arithmetic, values of type float
may have the
value zero and also values between about
and
as well as the special values Inf
(too large for this data
type) and NaN
(Not-A-Number, for undefined results such as the
square root of a negative number; see isnan).
DOUBLE
A double
number requires eight bytes of storage, and has a
double-precision floating-point value. As for float
values, the
precision reached depends on your computer. These values have at least
10 significant digits, and have a range of magnitudes at least as large
as that of a float
value. The largest and smallest representable
absolute non-zero values of type double
are #max_double
(#max_double) and #min_double
(#min_double).
On computers that comply with the IEEE 754-1985 standard for binary
floating-point arithmetic, values of type double
may have the
value zero and also values between about
and
as well as the special values Inf
(too large for this data
type) and NaN
(Not-A-Number, for undefined results such as the
square root of a negative number).
On computers that comply with the IEEE 754-1985 standard, the ratio
1.0/0.0
yields the value Inf
(infinity), and that value is
available in the global variable #infty
. On computers that do
not allow division by (floating-point) zero, #infty
is equal to
#max_float
.
See also: #infty
Next: Integer Numbers, Previous: Scalars, Up: Scalars [Contents][Index]