From: Kenta Murata <muraken@...> Date: 2011-05-09T14:54:53+09:00 Subject: [ruby-core:36051] [Ruby 1.9 - Bug #4656][Open] Float#to_s can produce too many digits Issue #4656 has been reported by Kenta Murata. ---------------------------------------- Bug #4656: Float#to_s can produce too many digits http://redmine.ruby-lang.org/issues/4656 Author: Kenta Murata Status: Open Priority: Normal Assignee: Kenta Murata Category: Target version: ruby -v: ruby 1.9.3dev (2011-05-09 trunk 31491) [x86_64-darwin10.7.0] In trunk, Float#to_s can produce too many digits. $ ./miniruby -ve 'puts Float::DIG, 3970 / 3000.0' ruby 1.9.3dev (2011-05-09 trunk 31491) [x86_64-darwin10.7.0] 15 1.3233333333333333 In the above example, Float::DIG is 15, so the number of significant digits is at most 16. However, the indefinite 17th digit is produced. 1.9.2 also has this issue. -- http://redmine.ruby-lang.org