MaggotChild wrote:

> On Dec 1, 5:52ï¿½am, Marnen Laibow-Koser <(E-Mail Removed)> wrote:

>>

>> The notation is misleading. ï¿½It's not a question of precision, but of

>> type. ï¿½You can think of 2.0 as 2:Float, not 2 to 2 significant figures.

>

> Yes, I do, but when it comes to printing, Float does not.
You can always redefine Float.to_s. Changing the underlying type,

though, is probably a poor idea.

>

>>

>> >>> j == j.to_i ? j.to_i : j

>> > => 2

>>

>> > Is there a "better" way?

>>

>> Why even bother?

>

> OCD
Apply your OCD in the right places, though!

Best,

--Â*

MarnenÂ*Laibow-Koser

http://www.marnen.org
(E-Mail Removed)
--

Posted via

http://www.ruby-forum.com/.