I'm not an expert in maths but the following operation gives a different result in ruby than in any other language or calculator I've tried:<p>Ruby:
(289 / 30 * 30) - (149 / 30 * 30)<p>150<p>Rest of the world:
(289 / 30 * 30) - (149 / 30 * 30)<p>140<p>An explanation is greatly appreciated
289/30 is exactly 9 and 149/30 is exactly 4 because they are integer expressions. You need to specify the constants as floating point values if you want floating point behavior.<p>Ruby does know how to do math and is doing precisely what you told it to.