The two common floating-point types in C are float and double. We haven't said much about the differences between them, because there isn't much to say: double generally gives you more precision (more digits' worth of significance), and perhaps more range (an ability to use numbers with larger exponents) than float. Continuing this progression, ANSI C added a third floating-point type, long double, which may give you even more range or even more precision. If you're using a machine with an extended-precision floating-point format, long double will let you access that format. But if your machine has only two floating-point formats, float and double will probably map to those, and long double won't end up being any better than plain double.
The printf and scanf formats for long double are %Le, %Lf, and %Lg.
Read sequentially: prev next up top
This page by Steve Summit // Copyright 1996-1999 // mail feedback