[#37248] [Feature:1.9] Enumerator#inspect — "Yusuke ENDOH" <mame@...>

遠藤です。

12 messages 2008/12/02

[#37337] [Feature #841] Object#self — "rubikitch ." <redmine@...>

Feature #841: Object#self

13 messages 2008/12/09

[#37513] Current status of 1.9.1 RC1's issues — "Yugui (Yuki Sonoda)" <yugui@...>

Hi, folks

14 messages 2008/12/20
[#37516] Re: Current status of 1.9.1 RC1's issues — Masatoshi SEKI <m_seki@...> 2008/12/20

咳といいます。

[#37576] [BUG:trunk] encoding for stdio's — "Yugui (Yuki Sonoda)" <yugui@...>

Yuguiです。

11 messages 2008/12/24

[ruby-dev:37537] [Bug #913] mathn した場合、sqrt(NaN) が複素数になる

From: Yuki Sonoda <redmine@...>
Date: 2008-12-22 02:38:38 UTC
List: ruby-dev #37537
チケット #913 が更新されました。 (by Yuki Sonoda)


たぶん、こんな感じだと思います。コミットしてよいですか? < 石塚さん

diff --git a/lib/mathn.rb b/lib/mathn.rb
index 48cb99f..0241f57 100644
--- a/lib/mathn.rb
+++ b/lib/mathn.rb
@@ -134,6 +134,8 @@ module Math
       else
        Complex(x, -y)
       end
+    elsif a.respond_to?(:nan?) and a.nan?
+      a
     elsif a >= 0
       rsqrt(a)
     else

----------------------------------------
http://redmine.ruby-lang.org/issues/show/913

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

In This Thread

Prev Next