Bignum's divmod, modulo, div operations produce incorrect results in some cases
-------------------------------------------------------------------------------

                 Key: JRUBY-1938
                 URL: http://jira.codehaus.org/browse/JRUBY-1938
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1RC1
         Environment: Latest JRuby 1.1RC1
            Reporter: Vladimir Sizikov


Consider the following:

{noformat}
p 
-6277101735386680763835789423207666416102355444464034512898.modulo(-6277101735386680763835789423207666416102355444464034512898)
p 
-6277101735386680763835789423207666416102355444464034512896.divmod(6277101735386680763835789423207666416102355444464034512897)
p 
-6277101735386680763835789423207666416102355444464034512896.div(6277101735386680763835789423207666416102355444464034512897)
{noformat}

MRI prints:
0
[-1, 1]
-1

JRuby prints:
-6277101735386680763835789423207666416102355444464034512898
[0, -6277101735386680763835789423207666416102355444464034512896]
0


This leads to numerous failures of MRI's test_integer.rb tests.

Fix is coming.


-- 
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