Issue #5266 has been updated by Kenta Murata.

Assignee set to Kenta Murata


----------------------------------------
Bug #5266: BigDecimal#sqrt ??с??紊с?????違?綛??号?鴻???荀?羆???????膕上墾???篏????????膀???蚊???????腟???????????????????
http://redmine.ruby-lang.org/issues/5266

Author: Makoto Kishimoto
Status: Open
Priority: Normal
Assignee: Kenta Murata
Category: ext
Target version: 1.9.x
ruby -v: ruby 1.9.4dev (2011-07-18 trunk 32577) [x86_64-freebsd8.2]


BigDecimal#sqrt ??с??紊с???????逸??10**n ??с??????????? n > 100 ?????????
??????蕁????鐚???綛??号?鴻??羆?????????????sqrt ??????逸??罅???違?ц??羆??????????膕上墾???????鐚?
??????????????? 20 鐔? 0.55 * n ??????????緇?????????????????????????冴?障????????

篁ヤ????隙??箴????腓冴????茯??????障?????

$ irb19
irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 1.9.4dev (2011-07-18 trunk 32577) [x86_64-freebsd8.2]"
irb(main):002:0> require "bigdecimal"
=> true
irb(main):003:0> BigDecimal("2" + "0" * 100).sqrt(55)
=> #<BigDecimal:801370a88,'0.1414213562 3730925960 0758552551 27E51',36(81)>
irb(main):004:0> BigDecimal("2" + "0" * 100).sqrt(56)
=> #<BigDecimal:8013720b8,'0.1414213562 3730950488 0168872420 9698078569 6718753769 4807317668 1337583355E51',81(90)>

101 罅????違?綛??号?鴻?с??55 罅???膕上墾??荀?羆???????????36 罅??????????????
絽違?c??ャ?????56 罅???????????ゃ???莠??????????????????障????????20罅?腮?綺?膕上墾?????
????????障????????

irb(main):005:0> BigDecimal("2" + "0" * 200).sqrt(109)
=> #<BigDecimal:80137ba00,'0.1414213562 3730950488 0168872420 9698078570 3148413402 613295E101',63(135)>
irb(main):006:0> BigDecimal("2" + "0" * 200).sqrt(110)
=> #<BigDecimal:80137d0a8,'0.1414213562 3730950488 0168872420 9698078569 6718753769 4807317667 9737990732 4784621071 8501120828 2516704398 7185098437 5959938108 258992945E101',144(144)>

201 罅????違??????荀?羆???????膕上墾??? 109 罅???? 110 罅????????????????????????
??障????医幻???????腟??????膕上墾?????腮?綺??????障?????


-- 
http://redmine.ruby-lang.org