Website hosting service by

 Back to Index

2.4.5 Floating point literals

Floating point literals are described by the following lexical definitions:


floatnumber  ::=  pointfloat | exponentfloat
pointfloat  ::=  [intpart] fraction | intpart "."
exponentfloat  ::=  (intpart | pointfloat) exponent
intpart  ::=  digit+
fraction  ::=  "." digit+
exponent  ::=  ("e" | "E") ["+" | "-"] digit+
Download entire grammar as text.

Note that the integer and exponent parts of floating point numbers can look like octal integers, but are interpreted using radix 10. For example, "077e010" is legal, and denotes the same number as "77e10". The allowed range of floating point literals is implementation-dependent. Some examples of floating point literals:

3.14    10.    .001    1e100    3.14e-10    0e0

Note that numeric literals do not include a sign; a phrase like -1 is actually an expression composed of the operator - and the literal 1.




2002-2004 Website Hosting Service


Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to offers cheap domain registration, domain name transfer and domain search services   Cheap domain name - Cheap domain name registration service including free domain hosting services  

Domain registration : Buy domain name or register domain name from $5.95/year only