Floating point literal expressions

Sather - Language Specification
Prev | Chapter 6. Literal Expressions | Next

# 6.5. Floating point literal expressions

Example 6-6. Examples:

    12.34
    3.498_239e-8d

    flt_literal_expression ==>
            [-] decimal_int . decimal_int [e [-] decimal_int] [ d ]

FLT and FLTD objects represent floating point numbers according to the single and double representations defined by the IEEE-754-1985 standard (see also See Type). A floating point literal is of type FLT unless suffixed by 'd' designating a FLTD literal. The optional 'e' portion is used to specify a power of 10 by which to multiply the decimal value. Underscores may be used within floating point literals to improve readability and are ignored. Literal values are only legal if they are within the range specified by the IEEE standard.

Prev | Home | Next
Integer literal expressions | Up | Basic Expressions