On Fri, Feb 1, 2013 at 11:40 PM, Ron Piggott <ron.pigg...@actsministries.org
> wrote:

> How can I get the 25 by itself?
> - I want to drop the “2.” and remove all the zero’s
>
> Would it be best to turn this into a STRING?
>

I would recommend turning it into a string, splitting the string at the
decimal, then scanning the second string for the first non-zero and storing
the subsequent characters. Working with floats at that precision level
would likely lead to tragic results:

"10.0 times .1 is hardly ever 1.0"
http://www.eg.bucknell.edu/~xmeng/Course/CS2330/Handout/StyleKP.html

Adam

-- 
Nephtali:  A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com

Reply via email to