From: Wilson Bilkovich Date: 2005-12-13T09:22:20+09:00 Subject: Re: Using Float For Currency On 12/12/05, Hunter's Lists wrote: > Howdy, > > I have some methods that manipulate floats that represent a currency amount. > > I often end up with more precision than I need, i.e.: $9.756. > > What is the best way to scale that to 9.76? > Try: val = 9.756 sprintf("%.2f", val) That says "print 'val' as a floating point value, with two decimal places of precision.