دنبال کننده ها

۱۳۹۷ فروردین ۱۹, یکشنبه

java - What rounding mode is used for printf("%g", double)?

[ad_1]



Javadoc for Formatter class mentions only default rounding mode for %f, %e formatting flags (RoundingMode.HALF_UP). But nothing is said about %g flag (used for scientific notation).



What is default rounding mode for %g ?



Also RoundingMode.HALF_UP by "silent analogy"?




[ad_2]

لینک منبع