Hi. I'm working on a text-displaying function in a graphics mode, and I'm having trouble displaying double, long double and float

(since there are no direct double-to-string functions as far as I know).

I split the number into several parts. The part that is left is to convert a number between 0 and 1 like this:

0.0234 -> 234

0.934000 -> 934

0.00000008 -> 8

(you cut the zeros in front and back)

I tried to do something like this, but I get floating point errors:

Help please?Code:double Number=0.02370; while((Number-(double)(long int)Number)!=0) { Number*=10; }

Or if someone know a better way to convert double -> string, I'm all ears .