Datasheet

FLOATING POINT CONSTANTS
A floating-point constant consists of:
- Decimal integer
- Decimal point
- Decimal fraction
-
e or E and a signed integer exponent (optional)
- Type suffix: f or F or l or L (optional)
Either decimal integer or decimal fraction (but not both) can be omitted. Either dec-
imal point or letter e (or E) with a signed integer exponent (but not both) can be omit-
ted. These rules allow conventional and scientific (exponent) notations.
Negative floating constants are taken as positive constants with an unary operator
minus (-) prefixed.
The mikroC PRO for AVR limits floating-point constants to the range
±1.17549435082 * 10-38 .. ±6.80564774407 * 1038.
Here are some examples:
0. // = 0.0
-1.23 // = -1.23
23.45e6 // = 23.45 * 10^6
2e-5 // = 2.0 * 10^-5
3E+10 // = 3.0 * 10^10
.09E34 // = 0.09 * 10^34
The mikroC PRO for AVR floating-point constants are of the type double. Note that
the mikroC PRO for AVR’s implementation of ANSI Standard considers float and
double (together with the long double variant) to be the same type.
129
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5