From: Kane Williams Date: 2011-09-11T18:47:23+09:00 Subject: Re: How do I make output generate a float without an excess numbers of decimal places? Dan Nachbar wrote in post #1021235: > You might try using the % instance method of String. > For example: > "%.2f" % (1.0/3) => "0.33" > > Dan Nachbar Would you mind explaining the > "%.2f" part? What does the % do? And what does the f do? Thanks! -- Posted via http://www.ruby-forum.com/.