From: "phasis68 (Heesob Park)" Date: 2013-11-29T15:39:33+09:00 Subject: [ruby-core:58673] [ruby-trunk - Bug #6986] Inconsistent result of BigDecimal#power Issue #6986 has been updated by phasis68 (Heesob Park). There is still NoMemoryError on Windows with trunk. C:\Users\phasis>ruby -v -rbigdecimal -e "p BigDecimal('1e-10').power(1e8)" ruby 2.1.0dev (2013-11-28 trunk 43886) [i386-mingw32] -e:1:in `power': failed to allocate memory (NoMemoryError) from -e:1:in `
' ---------------------------------------- Bug #6986: Inconsistent result of BigDecimal#power https://bugs.ruby-lang.org/issues/6986#change-43241 Author: phasis68 (Heesob Park) Status: Closed Priority: Normal Assignee: mrkn (Kenta Murata) Category: ext Target version: ruby -v: ruby 2.0.0dev (2012-09-05 trunk 36913) [i386-mswin32_100] Backport: I found BigDecimal#power returns incorrect result for a large value. C:\tmp>ruby -rbigdecimal -e "p BigDecimal('1e-10').power(1e7)" # C:\tmp>ruby -rbigdecimal -e "p BigDecimal('1e-10').power(1e8)" -e:1:in `power': failed to allocate memory (NoMemoryError) from -e:1:in `
' C:\tmp>ruby -rbigdecimal -e "p BigDecimal('1e-10').power(1e10)" # C:\tmp>ruby -rbigdecimal -e "p BigDecimal('1e-10').power(1e19)" # -- http://bugs.ruby-lang.org/