Project

General

Profile

Actions

Bug #1828

closed

1/-20 == -1 ?

Added by phasis68 (Heesob Park) over 11 years ago. Updated almost 10 years ago.

Status:
Rejected
Priority:
Normal
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 11 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 11 years ago

  • Status changed from Open to Rejected

=begin

=end

Actions

Also available in: Atom PDF