jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-3566

bug in multiplication

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.2
  • Fix Version/s: JRuby 1.3RC1
  • Component/s: RubySpec
  • Labels:
    None
  • Environment:
    jirb or jruby

Description

y=1073741824
z0 = y*y*y
-> 0 (in jruby)
but
-> 1237940039285380274899124224 (in ruby)

hint: in hex
y = 0x40000000

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Charles Oliver Nutter added a comment - 13/Apr/09 9:41 PM

Hah, very nice. We must not be detecting overflow in integer multiplication correctly.

Show
Charles Oliver Nutter added a comment - 13/Apr/09 9:41 PM Hah, very nice. We must not be detecting overflow in integer multiplication correctly.
Hide
Permalink
Charles Oliver Nutter added a comment - 13/Apr/09 10:57 PM

I love stupid little things like this, so I went ahead and fixed it. I also added a spec.

Show
Charles Oliver Nutter added a comment - 13/Apr/09 10:57 PM I love stupid little things like this, so I went ahead and fixed it. I also added a spec.

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    Karl Brodowsky
Vote (0)
Watch (1)

Dates

  • Created:
    13/Apr/09 2:54 PM
    Updated:
    15/May/09 5:11 PM
    Resolved:
    13/Apr/09 10:57 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.