Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigDecimal/float difference between MRI and JRuby #5904

Confusion opened this issue Oct 3, 2019 · 0 comments


Copy link

commented Oct 3, 2019

Expected Behavior

In MRI the following comparison returns false:

2.5.3 :001 >'.803e1') == 8.03
 => false 

This is probably because there is no exact floating point representation for the number 8.03 (as opposed to e.g. 8.02 and 8.04, for which the similar comparison returns true.

Actual Behavior

jruby- :001 >'0.803e1') == 8.03
 => true 

This is not a problem for me, except that it was surprising that a spec passed in JRuby that I expected to fail.


  • jruby (2.5.3) 2019-08-20 a1ac7ff OpenJDK 64-Bit Server VM 11.0.4+11-post-Ubuntu-1ubuntu218.04.3 on 11.0.4+11-post-Ubuntu-1ubuntu218.04.3 +jit [linux-x86_64]
  • Linux photon 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.