From: Gary Wright Date: 2009-04-14T14:49:52+09:00 Subject: [ruby-core:23201] Re: [Bug #1336] Change in string representation of Floats On Apr 14, 2009, at 1:05 AM, Yukihiro Matsumoto wrote: > |Consider that (here at least): > |2.1-3.0+0.9 == 1.110223024625156540e-16 > | > |I'd like to be proven wrong, but I currently believe that the one > cannot > |create a human friendly Float string conversion that is also a > regenerating > |representation. > > I agree with it. My opinion is that IF we need to get regenerating > string representation, we need a method dedicated to the purpose > (e.g. dump). I am not yet convinced we need such method. I don't think it is even possible unless you introduce binary (or maybe hex) floating point literals. That is the only way you are going to be able to safely round-trip between an internal IEEE floating point value and a string representation. Gary Wright