[1.9] Math.gamma(-1.0/0), Math.gamma(1.0/0) and Math.gamma(0.0/0) return 
incorrect results
------------------------------------------------------------------------------------------

                 Key: JRUBY-4430
                 URL: http://jira.codehaus.org/browse/JRUBY-4430
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Ruby 1.9
    Affects Versions: JRuby 1.4
         Environment: github trunk, Java 6, Mac OS X 10.6.2
            Reporter: Hiro Asari
             Fix For: JRuby 1.5
         Attachments: 
0001-Align-Math.gamma-behavior-with-that-of-MRI-on-Infini.patch

Note on MRI trunk:
{noformat}
surfboard:~$ ruby1.9 -v -e 'p Math.gamma(-1.0/0)'ruby 1.9.2dev (2010-01-04 
trunk 26238) [x86_64-darwin10.2.0]
-e:1:in `gamma': Numerical argument out of domain - gamma (Errno::EDOM)
        from -e:1:in `<main>'
surfboard:~$ ruby1.9 -v -e 'p Math.gamma(1.0/0); p Math.gamma(0.0/0)'
ruby 1.9.2dev (2010-01-04 trunk 26238) [x86_64-darwin10.2.0]
Infinity
NaN
{noformat}

Specs I added in RubySpec commit 0314628 will trip JRuby.

I attached the patch to fix this issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to