Project

General

Profile

Actions

Bug #1828

closed

1/-20 == -1 ?

Added by phasis68 (Heesob Park) almost 15 years ago. Updated about 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
ruby -v:
ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
Backport:
[ruby-core:24586]

Description

=begin
Dividing positive number by negative number returns incorrect value.

irb(main):001:0> 1/-20
=> -1
irb(main):002:0> 30/-20
=> -2
irb(main):003:0> 20/-30
=> -1
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0