HP C/iX Reference Manual (31506-90011)
Chapter 2 19
Lexical Elements
Constants
NOTE
Suffixes in floating-constants are available only in ANSI mode.
Description
A floating constant has a value part that may be followed by an exponent part and a suffix
specifying its type. The value part may include a digit sequence representing the
whole-number part, followed by a period (.), followed by a digit sequence representing the
fraction part. The exponent includes an e or an E followed by an exponent consisting of an
optionally signed digit sequence. Either the whole-number part or the fraction part must
be used; either the period or the exponent part must be used.
The format of floating-point numbers is given in Chapter 9, HP C/iX Implementation
Topics.
A floating constant may include a suffix that specifies its type. F or f specifies type float
(single precision). L or l specifies long double (quad precision). The default type
(unsuffixed) is double.
Examples
3.28e+3f
float constant = 3280
6.E2F
float constant = 600
201e1L
long double constant = 2010
4.8
double constant = 4.8