We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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
Hi, I noticed there's a loss in precision when using 1.7.19. This is fixed in 9000. I thought it'd be a good idea to report this anyways.
1.7.19:
$ ruby -v jruby 1.7.19 (2.0.0p598) 2015-01-29 20786bd on Java HotSpot(TM) 64-Bit Server VM 1.8.0_25-b17 +jit [darwin-x86_64] $ irb >> require 'bigdecimal' => true >> BigDecimal.new("10.9", 2).to_f => 11.0
9.0.0.0.pre1:
$ ruby -v jruby 9.0.0.0.pre1 (2.2.0p0) 2015-01-20 d537cab Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 +jit [darwin-x86_64] $ irb >> require 'bigdecimal' => true >> BigDecimal.new("10.9", 2).to_f => 10.9
MRI 2.2.0:
$ ruby -v ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14] $ irb >> require 'bigdecimal' => true >> BigDecimal.new("10.9", 2).to_f => 10.9
I'm running this on mac using OS X 10.10.2 and the JVM:
$ java -version java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
The text was updated successfully, but these errors were encountered:
Hmm...could be a difference in default rounding mode?
Sorry, something went wrong.
Good beginner bug to sort out exactly why we differ here.
I just tested and under 1.7.19, BigDecimal.new("10.4", 2).to_f => 10.0
1.7.19
BigDecimal.new("10.4", 2).to_f => 10.0
fix the creation of BigDecimal from a String
5f4bb39
follow what MRI is doing and ignore the precision fixes #2650 Sponsored by Lookout Inc.
9b8aa73
mkristian
No branches or pull requests
Hi,
I noticed there's a loss in precision when using 1.7.19. This is fixed in 9000.
I thought it'd be a good idea to report this anyways.
1.7.19:
9.0.0.0.pre1:
MRI 2.2.0:
I'm running this on mac using OS X 10.10.2 and the JVM:
The text was updated successfully, but these errors were encountered: