From: Jeff Mitchell Date: 2004-04-22T04:36:05+09:00 Subject: Re: 5.000...007.to_s => "5" --- nobu.nokada@softhome.net wrote: > Hi, > > At Thu, 22 Apr 2004 02:48:18 +0900, > Gavin Kistner wrote in [ruby-talk:97891]: > > (The issue is not the lack of float precision...that's gotta give out > > at some point. The issue is the "5" vs. "5.0" discrepancy.) > > Seems the issue about the boundary between "e" and "f". > This fixes 1.000..7 but does not fix two other cases I didn't mention, arda:~/cur/ruby> ./ruby -e 'puts 1.00000000000004.to_s' 1.00000000000004 arda:~/cur/ruby> ./ruby -e 'puts 1.000000000000004.to_s' 1 arda:~/cur/ruby> ./ruby -e 'puts 1.0000000000000004.to_s' 1.0 arda:~/cur/ruby> ./ruby -e 'puts 1.99999999999999.to_s' 1.99999999999999 arda:~/cur/ruby> ./ruby -e 'puts 1.999999999999999.to_s' 2 arda:~/cur/ruby> ./ruby -e 'puts 1.9999999999999999.to_s' 2.0 __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25� http://photos.yahoo.com/ph/print_splash