[#36672] [Bug #616] instance_eval and Module#to_s — Shyouhei Urabe <redmine@...>

Bug #616: instance_eval and Module#to_s

12 messages 2008/10/06

[#36750] [Bug #650] Marshal.load raises RegexpError — Shyouhei Urabe <redmine@...>

Bug #650: Marshal.load raises RegexpError

30 messages 2008/10/15
[#36769] Re: [Bug #650] Marshal.load raises RegexpError — Yukihiro Matsumoto <matz@...> 2008/10/17

まつもと ゆきひろです

[#36771] Re: [Bug #650] Marshal.load raises RegexpError — Urabe Shyouhei <shyouhei@...> 2008/10/17

卜部です。

[#36772] Re: [Bug #650] Marshal.load raises RegexpError — Yukihiro Matsumoto <matz@...> 2008/10/17

まつもと ゆきひろです

[#36773] Re: [Bug #650] Marshal.load raises RegexpError — Urabe Shyouhei <shyouhei@...> 2008/10/17

卜部です。

[#36784] Re: [Bug #650] Marshal.load raises RegexpError — Yukihiro Matsumoto <matz@...> 2008/10/18

まつもと ゆきひろです

[#36785] Re: [Bug #650] Marshal.load raises RegexpError — Urabe Shyouhei <shyouhei@...> 2008/10/18

卜部です。

[#36793] Re: [Bug #650] Marshal.load raises RegexpError — Yukihiro Matsumoto <matz@...> 2008/10/19

まつもと ゆきひろです

[#36794] Re: [Bug #650] Marshal.load raises RegexpError — Urabe Shyouhei <shyouhei@...> 2008/10/19

Yukihiro Matsumoto さんは書きました:

[#36823] Re: [Bug #650] Marshal.load raises RegexpError — Yukihiro Matsumoto <matz@...> 2008/10/21

まつもと ゆきひろです

[#36830] Re: [Bug #650] Marshal.load raises RegexpError — Urabe Shyouhei <shyouhei@...> 2008/10/21

もとの正規表現にバグがあるのは認めますが、それに巻き込まれてでかいPStore

[#36833] Re: [Bug #650] Marshal.load raises RegexpError — Yukihiro Matsumoto <matz@...> 2008/10/21

まつもと ゆきひろです

[#36764] Re: [ruby-cvs:27036] Ruby:r19818 (trunk): * transcode.c (str_transcode0): String#encode without argument now — Martin Duerst <duerst@...>

まつもとさん、こんばんは。

11 messages 2008/10/17
[#36767] Re: [ruby-cvs:27036] Ruby:r19818 (trunk): * transcode.c (str_transcode0): String#encode without argument now — Yukihiro Matsumoto <matz@...> 2008/10/17

まつもと ゆきひろです

[#36799] Re: [ruby-cvs:27036] Ruby:r19818 (trunk): * transcode.c (str_transcode0): String#encode without argument now — Martin Duerst <duerst@...> 2008/10/20

まつもとさん、こんにちは。

[#36774] ConverterNotFoundError while making Ruby in Windows(trunk) — Masaki Suketa <masaki.suketa@...>

助田です。

13 messages 2008/10/17
[#36797] Re: ConverterNotFoundError while making Ruby in Windows(trunk) — "U.Nakamura" <usa@...> 2008/10/20

こんにちは、なかむら(う)です。

[#36800] Re: ConverterNotFoundError while making Ruby in Windows(trunk) — "U.Nakamura" <usa@...> 2008/10/20

こんにちは、なかむら(う)です。

[#36789] [Bug #660] 数字を3桁ずつコンマで区切るsprintf書式指定 — "rubikitch ." <redmine@...>

Bug #660: 数字を3桁ずつコンマで区切るsprintf書式指定

13 messages 2008/10/19

[#37007] [Bug:1.9] 1+1+1+...+1 dumps core — "Yusuke ENDOH" <mame@...>

遠藤です。

13 messages 2008/10/31

[ruby-dev:36662] Re: [IA-64]BigDecimal#sqrt の仕様

From: TAKANO Mitsuhiro <takano32@...>
Date: 2008-10-04 05:41:21 UTC
List: ruby-dev #36662
たかのです。

Yukihiro Matsumoto さんは書きました:
> まつもと ゆきひろです
>
> In message "Re: [ruby-dev:36634] Re: [IA-64]BigDecimal#sqrt   	の仕様"
>     on Tue, 30 Sep 2008 16:49:47 +0900, TAKANO Mitsuhiro <takano32@jus.or.jp> writes:
>
> |つまり、sqrtの引数をでっかくすると戻りのBigDecimalの有効数字が大きくなり、
> |precsの二番目の要素の値も大きくなるようです。
> |
> |なんだか薀蓄っぽくなってきたので、とりあえずパッチを送ります。
>
> コミット権はまださしあげていませんでしたっけ。
> 取り込んでおきます。
>
>   
すみません。
MacBook(x86_64)環境で動かしてみたらFailしてしまいました・・・orz
(たまたまうまく動いてしまう環境もあるのかしら。)

精度の小さいところの差を取ったものと精度の大きいところの差を取って比較し
たほうが
確実と考え、以下のように書き換えました。たびたびすみません。

# なんだか不安なので、識者の方でどなたかBigDecimalにお詳しいかたがいらっ
しゃったら
# ぜひご指摘お願いします。

Index: test/bigdecimal/test_bigdecimal.rb
===================================================================
--- test/bigdecimal/test_bigdecimal.rb (revision 19669)
+++ test/bigdecimal/test_bigdecimal.rb (working copy)
@@ -466,9 +466,7 @@
x = BigDecimal.new("0.09")
assert_in_delta(0.3, x.sqrt(1), 0.001)
x = BigDecimal.new((2**100).to_s)
- 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))
x = BigDecimal.new("-" + (2**100).to_s)
assert_raise(FloatDomainError) { x.sqrt(1) }
x = BigDecimal.new((2**200).to_s)



In This Thread