There are 3 types in C for representing real numbers.
| name | guaranteed | typical | <limits.h>
| digits | max | digits | max | digits | max
| float | 6 | 10e37 | 6 | 10e37 | FLT_DIG | FLT_MAX
| double | 10 | 10e+37 | 15 | 10e+308 | DBL_DIG | DBL_MAX
| long double | 10 | 10e+37 | 18 | 10e+4932 | LDBL_DIG | LDBL_MAX
| | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
For most purposes use double.
Floating point numbers appearing in the text of a program are, by default, of type double.