From: matt.dressel@... Date: 2014-11-17T21:19:41+00:00 Subject: [ruby-core:66337] [ruby-trunk - Bug #10429] Ruby 2.x exponents produce wildly varying precision for integers vs decimals Issue #10429 has been updated by Matt Dressel. What do I need to do to get someone to look at this? ---------------------------------------- Bug #10429: Ruby 2.x exponents produce wildly varying precision for integers vs decimals https://bugs.ruby-lang.org/issues/10429#change-49992 * Author: Matt Dressel * Status: Open * Priority: Normal * Assignee: * Category: core * Target version: * ruby -v: 2.0.0-p576, 2.1.3 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- ## 2.0.0 ``` > 1.1.to_d ** -1.9999999 => # > 1.1.to_d ** -2 => # > 1.1.to_d ** -2.0 => # > 1.1.to_d ** -2.0000001 => # ``` ## 2.1.3 ``` > 1.1.to_d ** -1.9999999 => # > 1.1.to_d ** -2 => # > 1.1.to_d ** -2.0 => # > 1.1.to_d ** -2.0000001 => # ``` Additionally, when the integer value increases, the precision increases: ## 2.0.0 ``` > 1.1.to_d ** 2 => # > 1.1.to_d ** 3 => # > 1.1.to_d ** 4 => # > 1.1.to_d ** 5 => # > 1.1.to_d ** 6 => # ``` -- https://bugs.ruby-lang.org/