wangwang / go-tour

Automatically exported from code.google.com/p/go-tour
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

I didn't quite understand how it worked for example From what I believe, x = 17 * 4 / 9 = 7.5555... #161

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
https://feedback.corp.google.com/#/Report/1186722144

Description:
I didn't quite understand how it worked for example

From what I believe,
x = 17 * 4 / 9 = 7.5555555556
y = 17 - 7.5555555556 = 9.4444444444

In javascript math.ceil(x) = 8 and math.floor = 7; similarly math.ceil(y) =10 
and math.floor(y) = 9

But in "go" how come the result is like,
x = math.floor(7.55555555555556) = 7 and
y = math.ceil(9.4444444) = 10

I think, I got something wrong, please somebody guide me and let me know on 
eddie@emooth.com.au

Thank you very much in Advanced,
Eddie

UI language: en
Detected language: en

Original issue reported on code.google.com by feedback...@gmail.com on 20 Aug 2013 at 10:44