C Language and Libraries Help (clang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
printf Precision: Floating-Point Types
◄Up► ◄Contents► ◄Index► ◄Back►
─────Run-Time Library───────────────────────────────────────────────────────
Floating-point types are e, E, f, g, and G.
See: ◄printf Type Characters►
Type Effect
e, E The precision specifies the number of digits to be
printed after the decimal point. The last digit is
rounded. Default precision is 6; if the precision value
is 0 or no number follows the period (.), no decimal
point is printed.
f The precision value specifies the number of digits after
the decimal point. If a decimal point appears, at least
one digit is printed before it. The value is rounded.
Default precision is 6; if the precision value is 0 or
no number follows the period (.), no decimal point is
printed.
g, G The precision specifies the maximum number of
significant digits. By default, six significant digits
are printed, less any trailing zeros that are truncated.
-♦-