ram@[EMAIL PROTECTED]
(Stefan Ram) writes:
>Either Sun Microsystems, Inc. expects the programmer to look
>into ISO/IEC 9899:1999 (E) for »%g«, or there is a more
>detailed description by Sun Microsystems, Inc., which I just
>have not found yet.
Now, I have found it:
»After rounding for the precision, the formatting of the
resulting magnitude m depends on its value.
If m is greater than or equal to 10^-4 but less than
10^precision then it is represented in decimal format.
If m is less than 10^-4 or greater than or equal to
10^precision, then it is represented in computerized
scientific notation.
The total number of significant digits in m is equal to
the precision. If the precision is not specified, then the
default value is 6. If the precision is 0, then it is
taken to be 1.«
http://download.java.net/jdk7/docs/api/java/util/Formatter.html


|