Floating-Point Types

There are 3 types in C for representing real numbers.

nameguaranteedtypical<limits.h>
digitsmaxdigitsmaxdigitsmax
float610e37610e37FLT_DIGFLT_MAX
double1010e+371510e+308DBL_DIGDBL_MAX
long double1010e+37 1810e+4932LDBL_DIGLDBL_MAX

For most purposes use double.

Floating point numbers appearing in the text of a program are, by default, of type double.

Index