Re: No difference between %f, %lf, and %Lf?
Kyle Sluder <[email protected]> Fri, 3 Jun 2011 11:23:09 -0700
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jun 3, 2011 at 9:52 AM, Christiaan Hofman <[email protected]> wrote: > The difference between %f, %lf, %Lf are about the size of the argument, not the representation as a string. For the representation such as number of decimals you have to provide flags and/or precision in the specifier IEEE printf specification. There is actually no difference at all between %f and %lf, as per the printf(2) documentation. Because printf is a vararg function, arguments are always promoted to doubles. Use %Lf for passing long double arguments. But long double is wacky. --Kyle Sluder