Project

General

Profile

Actions

Bug #1828

closed

1/-20 == -1 ?

Added by phasis68 (Heesob Park) over 14 years ago. Updated almost 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 #1

Updated by darix (Marcus Rückert) over 14 years ago

=begin
100/-20 => -5
1/-20.0 => -0.05

sounds to me like an invalid bug report.
=end

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

  • Status changed from Open to Rejected

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0