[MacRuby-devel] [MacRuby] #521: Float problem with 8.1 and 9.1

MacRuby ruby-noreply at macosforge.org
Fri Dec 25 03:29:38 PST 2009


#521: Float problem with 8.1 and 9.1
------------------------------------+---------------------------------------
 Reporter:  macruby@…               |       Owner:  lsansonetti@…        
     Type:  defect                  |      Status:  new                  
 Priority:  major                   |   Milestone:  MacRuby 0.5          
Component:  MacRuby                 |    Keywords:                       
------------------------------------+---------------------------------------

Comment(by emoy@…):

 Actually, this should be fixed with the float changes in #159.  This
 problem stems from the last two bits of the floating point number being
 used as flags, so there is a lose in precision.  Worse is that in 32-bit
 mode, floating point is done with 32-bit floats, so the two bit lose in
 precision is even worse:

 {{{
 % macruby -e 'puts 8.1'
 8.09999999999999
 % arch -i386 macruby -e 'puts 8.1'
 8.09999847412109
 }}}

 With the changes in #159:

 {{{
 % miniruby -e 'puts 8.1'
 8.1
 % arch -i386 miniruby -e 'puts 8.1'
 8.1
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/521#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list