Skip to main content

Constant: REAL, LREAL

You can specify floating-point numbers as REAL and LREAL constants either in decimal notation or exponential notation with mantissa and exponent. The decimal point serves as the decimal separator according to the International System of Units (English).

Syntax of exponential notation

<significand> e | E <exponent>
exponent : -44..38 // REAL
exponent : -324..308 // LREAL
Example 181. Example

REAL literal

7.4

Decimal number

7,4 with a comma returns a compiler error

1/3.0

Decimal fraction for 0.333333343

Note: In the case of division of integer types, the result remains an integer type. In this case, the value is rounded. For example, 1/3 yields 0 as the result.

1.64e+009

Exponential notation

-3.402823e+38

Smallest number

-1E-44

Largest negative number

1.0E-44

Smallest positive number

3.402823e+38

Largest number

LREAL literal

-1.7976931348623157E+308

Smallest number

-4.94065645841247E-324

Largest negative number

4.94065645841247E-324

Smallest positive number

1.7976931348623157E+308

Largest number



For more information, see: REAL, LREAL