4.3.7.2 Floating-point Constant
Floating-point constants have double
type unless suffixed
by f
or F
, in which case it is a float
constant. The suffixes l
or L
specify a long
double
type which is considered an identical type to double
by
MPLAB XC8.
Floating point constants can be specified as decimal digits with a decimal
point and/or an exponent. If you are using C99, they can be expressed as hexadecimal digits
and a binary exponent, initiated with either p
or P
. For
example:
myFloat = -123.98E12;
myFloat = 0xFFEp-22; // C99 float representation