On Oct 10, 2022, at 5:40 PM, Dante Castagnoli <dante.castagn...@gmail.com> wrote: > > Also, if you were to take an int(f), you will note that it returns "0", and > not "1".
%0.3f does *rounding*, while int(f) does *truncation*. 1.0 is closer to 0.9999... than 0.999 is to 0.9999... -- 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/B51E4191-D268-4F17-BD50-1FEB59B94379%40bitblocks.com.