Project

General

Profile

Backport #2462

Bignum comparison fail [ruby-dev:38672]

Added by nahi (Hiroshi Nakamura) over 9 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:27100]

Description

=begin
cf. Bug #1645 [ruby-dev:38672]

0% ruby -ve 'p(1.0/0.0 <=> Float::MAX.to_i * 2)'
ruby 1.8.8dev (2009-12-07 revision 25983) [i686-linux]
-e:1: warning: Bignum out of Float range
0

Backport needed?
=end

Associated revisions

Revision d040bf75
Added by knu (Akinori MUSHA) almost 8 years ago

Backport r23730; fixes #2462.

  • numeric.c (flo_cmp): Infinity is greater than any bignum
    number. [ruby-dev:38672]

  • bignum.c (rb_big_cmp): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@32573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 32573
Added by knu (Akinori MUSHA) almost 8 years ago

Backport r23730; fixes #2462.

  • numeric.c (flo_cmp): Infinity is greater than any bignum
    number. [ruby-dev:38672]

  • bignum.c (rb_big_cmp): ditto.

History

#1

Updated by nahi (Hiroshi Nakamura) over 9 years ago

=begin
0% ruby -ve 'p(-Float::MAX.to_i * 2 <=> 1.0/0.0)'
ruby 1.8.8dev (2009-12-07 revision 25983) [i686-linux]
-e:1: warning: Bignum out of Float range
0
0% ruby19 -ve 'p(-Float::MAX.to_i * 2 <=> 1.0/0.0)'
ruby 1.9.2dev (2009-12-01 trunk 25970) [i686-linux]
-1

=end

#2

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

  • Assignee set to knu (Akinori MUSHA)

=begin
r23730
=end

#3

Updated by shyouhei (Shyouhei Urabe) almost 9 years ago

  • Status changed from Open to Assigned

=begin

=end

#4

Updated by knu (Akinori MUSHA) almost 8 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32573.
Hiroshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Backport r23730; fixes #2462.

  • numeric.c (flo_cmp): Infinity is greater than any bignum
    number. [ruby-dev:38672]

  • bignum.c (rb_big_cmp): ditto.

Updated by knu (Akinori MUSHA) almost 8 years ago

  • Status changed from Closed to Assigned
  • Assignee changed from knu (Akinori MUSHA) to shyouhei (Shyouhei Urabe)
  • Target version changed from Ruby 1.8.8 to Ruby 1.8.7
#6

Updated by shyouhei (Shyouhei Urabe) over 2 years ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF