On 14 December 2016 at 18:35, Mauro Romano Trajber <traj...@gmail.com> wrote:
> The float to int conversion behaves different for 32 and 64 precision.
> https://play.golang.org/p/-zkCNSTbNa
>
> Is this the correct behavior?

It's a caveat for working with floating point numbers, in no way specific to Go:

~ > python
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 80917.65*100
8091764.999999999

Riggs

-- 
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