Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Dajve_Bloke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
Dajve_Bloke
7y ago
NB - you get the same result in MS-SQL (and for exactly the same reason). Ruby behaves like SQL in that appending a decimal to the values results in non-integer maths being employed. MS-SQL itself is slightly out (I assume due to floating p
2.
▲
by
Dajve_Bloke
7y ago
289/30 = 9 as it's truncating the non-integer part of the operation. So the calculation evaluates to 270 - 120 = 150