Project

General

Profile

Actions

Bug #9595

closed

Float#to_d inconsistent between 2.0.0 and 2.1.1

Added by boone (Mike Boone) about 10 years ago. Updated over 3 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
Backport:
[ruby-core:61307]
Tags:

Description

The following code produces different BigDecimal results in 2.0.0 vs. 2.1.1:

require 'big decimal'
require 'bigdecimal/util'
(1/1.3667).to_d

2.0.0 returns: #<BigDecimal:7fa7fc04dc28,'0.7316894709 885124E0',18(45)>
2.1.1 returns: #<BigDecimal:7fabd1a25768,'0.7316894709 88512E0',18(36)>

2.1.1 is a digit short. Related to #9305?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0