Bug #2483
closedString#to_f of small numbers hangs
Description
=begin
There is a problem in the String#to_f method. It hangs when the float is really small.
This works:
ruby-1.8 -e 'puts "1e-20".to_f'
This hangs:
ruby-1.8 -e 'puts "1e-100".to_f'
=end
Updated by mikisvaz (Miguel Vazquez) over 14 years ago
=begin
I'm using archlinux. I've just tried several versions of the 1.8, the 174 and the 72 patches and both still hang. 1.9 works fine.
=end
Updated by shyouhei (Shyouhei Urabe) over 13 years ago
- Status changed from Open to Feedback
=begin
Can you see if it still happens? I can't reproduce the situation on my machine now.
=end
Updated by zimbatm (zimba tm) over 13 years ago
=begin
Can't reproduce the bug on Mac OS X 10.6.5 with ruby-1.8.7-p302
=end
Updated by sorah (Sorah Fukumori) over 13 years ago
=begin
Can't reproduce on OSX10.6.5 and Debian squeeze (amd64) with 1.8 trunk.
[sorah@lemonade]:~/git/ruby/core18/builds/master% ruby -ve 'puts "1e-100".to_f'
ruby 1.8.8dev (2010-11-24) [i386-darwin10.5.0]
1.0e-100
[sorah@cleveland]:~/git/ruby/core18/builds/master% ruby -ve 'puts "1e-100".to_f'
ruby 1.8.8dev (2010-11-24) [x86_64-linux]
1.0e-100
=end
Updated by jeremyevans0 (Jeremy Evans) over 4 years ago
- Description updated (diff)
- Status changed from Feedback to Closed