Created
December 8, 2010 11:46
-
-
Save german/733175 to your computer and use it in GitHub Desktop.
error in multiplication in ruby 1.9.2 && 1.9.3dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.9.3dev | |
$ ruby -v | |
ruby 1.9.3dev (2010-12-08 trunk 30125) [i686-linux] | |
$ irb | |
ruby-head > 125.33 - (125.33/100.0*50.0) | |
=> 62.66499999999999 | |
ruby-head > 125.33 / 100.0 * 50.0 | |
=> 62.665000000000006 | |
ruby-head > 15.33 / 100.0 * 50.0 | |
=> 7.664999999999999 | |
ruby-head > (15.33 / 100.0) * 50.0 | |
=> 7.664999999999999 | |
ruby-head > (14.33 / 100.0) * 50.0 | |
=> 7.165000000000001 | |
1.9.2 | |
$ ruby -v | |
ruby 1.9.2dev (2009-07-18 trunk 24186) [i686-linux] | |
$ irb | |
ruby-1.9.2-preview1 > (14.33 / 100.0) * 50.0 | |
=> 7.165000000000001 | |
1.8.7 | |
$ ruby -v | |
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02 | |
$ irb | |
irb(main):001:0> (14.33 / 100.0) * 50.0 | |
=> 7.165 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment