Bugs: Browse | Submit New | Admin

[#14102] Float#to_i gives incorrect sign in x86_64_linux

Date:
2007-09-20 06:02
Priority:
3
Submitted By:
Javier Goizueta (jgoizueta)
Assigned To:
Shyouhei Urabe (shyouhei)
Category:
Language / Runtime / Core Libraries
State:
Open
Platform:
 
Summary:
Float#to_i gives incorrect sign in x86_64_linux

Detailed description
Float#to_i changes the sign of some numbers.
In 1.8.4 (2005-12-24) [x86_64_linux]
  puts 4.611686018427388e+018.to_i -> -4611686018427387904
In 1.8.2 (2004-12-25) [i686_linux]
and 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
the result is correct:
  puts 4.611686018427388e+018.to_i -> 4611686018427387904

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-11-07 20:10
Sender: Roger Pack

If this is still a concern then could you submit a new copy to
the new tracker:
http://redmine.ruby-lang.org/
--this tracker is being shelved.
Thanks!
-=R

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item