Floats
Describes floats (float) in
OPL.
Shows how to declare floats in the OPL language.
OPL also provides a subset of the real numbers as the
basic data type float. The implementation
of floats in OPL obeys the IEEE 754 standard for floating-point arithmetic
and the data type float in OPL uses double-precision
floating-point numbers. OPL also has a predefined float constant, infinity,
to represent the IEEE infinity symbol. Declarations of floats are
similar to declarations of integers.
The declaration
float f = 3.2;
declares a float f whose value
is 3.2.
The value of the float can be specified by an arbitrary expression.