12.07.2015 Views

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FloatsShows how to declare floats in the <strong>OPL</strong> language.<strong>OPL</strong> also provides a subset of the real numbers as the basic data type float. Theimplementation of floats in <strong>OPL</strong> obeys the IEEE 754 standard for floating-point arithmeticand the data type float in <strong>OPL</strong> uses double-precision floating-point numbers. <strong>OPL</strong> also hasa predefined float constant, infinity, to represent the IEEE infinity symbol. Declarationsof floats are similar to declarations of integers.The declarationfloat f = 3.2;declares a float f whose value is 3.2.The value of the float can be specified by an arbitrary expression.I L O G O P L D E V E L O P M E N T S T U D I O L A N G U A G ER E F E R E N C E M A N U A L19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!