Project

General

Profile

This project is closed and read-only.

Actions

Backport #3362

closed

rb_big2dbl incorrectly returns Infinity for a negative Bignum out of range of a double

Backport #3362: rb_big2dbl incorrectly returns Infinity for a negative Bignum out of range of a double

Added by brixen (Brian Shirai) over 16 years ago. Updated over 14 years ago.


Description

=begin
Revision 12261 changed rb_big2dbl in a way that caused a negative Bignum out of range of a double to be returned as Infinity rather than -Infinity. This was a regression that appears to be fixed in 1.9 but is still present in 1.8.7p249.

Could a fix for this be backported to 1.8.7 or are no further 1.8.7 versions being released? Also, the bug is still in http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8 so would presumably appear an a 1.8.8 release.

Thanks,
Brian
=end

Updated by shyouhei (Shyouhei Urabe) over 16 years ago Actions #1

  • Status changed from Open to Assigned
  • Assignee set to shyouhei (Shyouhei Urabe)

=begin
Yes there'll be another 1.8.7 release. I'll backport it later.
=end

Updated by shyouhei (Shyouhei Urabe) over 16 years ago Actions #2

  • Target version set to Ruby 1.8.8
  • ruby -v set to ruby 1.8.8dev (2010-06-08 revision 27061) [x86_64-linux]

=begin
zsh % ~/target/ruby_1_8/bin/ruby -ve'p (-1 << 65536).to_f'
ruby 1.8.8dev (2010-06-08 revision 27061) [x86_64-linux]
-e:1: warning: (...) interpreted as grouped expression
-e:1: warning: Bignum out of Float range
Infinity

=end

Updated by shyouhei (Shyouhei Urabe) over 16 years ago Actions #3

  • Assignee changed from shyouhei (Shyouhei Urabe) to mrkn (Kenta Murata)

=begin

=end

Updated by mrkn (Kenta Murata) over 16 years ago Actions #4

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

=begin
This issue was solved with changeset r28324.
Brian, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Updated by naruse (Yui NARUSE) almost 15 years ago Actions #5

  • Tracker changed from Bug to Backport
  • Project changed from 2 to 5
  • Status changed from Closed to Assigned
  • Assignee changed from mrkn (Kenta Murata) to shyouhei (Shyouhei Urabe)
  • Target version deleted (Ruby 1.8.8)

Updated by shyouhei (Shyouhei Urabe) over 14 years ago Actions #6

  • Status changed from Assigned to Closed

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


merge revision(s) 28324:
* bignum.c (rb_big2dbl), test/ruby/test_bignum.rb (test_to_f):
A negative Bignum out of Float range should be converted to -Infinity.
[ruby-core:30492] [Bug #3362]

Actions

Also available in: PDF Atom