From: TOYOFUKU Chikanobu Date: 2008-10-09T22:33:07+09:00 Subject: [ruby-dev:36695] Re: [IA-64]BigDecimal#sqrt の仕様 豊福です。 In [ruby-dev:36662] > - assert_equal(1125899906842624, x.sqrt(100)) > - assert_equal(1125899906842624, x.sqrt(200)) > - assert_equal(1125899906842624, x.sqrt(300)) # I don't understand the meaning of argument... > + assert_equal(true, x.sqrt(100) - x.sqrt(200) > x.sqrt(300) - x.sqrt(400)) y = BigDecimal("1125899906842624") prec = y.precs[0] assert_equal(true, (x.sqrt(100) - y).abs < BigDecimal("1E#{prec-100}")) assert_equal(true, (x.sqrt(200) - y).abs < BigDecimal("1E#{prec-200}")) assert_equal(true, (x.sqrt(300) - y).abs < BigDecimal("1E#{prec-300}")) はどうでしょう。 ---