On Sun, 2 Sep 2018 07:23:55 -0700 (PDT)
Manlio Perillo <manlio.peri...@gmail.com> wrote:

> What happens if you need to divide 7 pennies by 4?

I do not know about pennies peculiarities, so I'll stay with ¤ ;)

I divide 70000µ¤ by 4 then It gives 17500µ¤. On customer account it
still is 17500µ¤ but on his statement it prints 0.018¤ (using 5/4 rounding
rules). The -500µ¤ goes to wherever local accounting law imposes on me.

Surely with pennies I'd do same thing ;)

> For financial applications you should use decimal floating-point numbers.
And soon see pink slip. Or even go to jail.

> Manlio
> 

-- 
Wojciech S. Czarnecki
 << ^oo^ >> OHIR-RIPE

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to