diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mathn.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mathn.rb b/lib/mathn.rb index 48cb99f8c..0241f578e 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 |