On Mon, Oct 10, 2022 at 6:10 PM Patrick Smith <pat42sm...@gmail.com> wrote:

>  %g differs from %f when printing large or small values.
> https://go.dev/play/p/lxj9fn19kOO
>

For the sake of completeness, I should add that they can also differ for
"normal" sized values: https://go.dev/play/p/xiFwOrK8Tv6
With %f, one specifies the number of fractional decimal places to appear;
with %g, the number of significant figures.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAADvV_t%3DmR3W080zsCOH%3DQ-r5PX-rrbH%3DdhytObuMxB52x%3DUhA%40mail.gmail.com.

Reply via email to