converting a float to a character string

Jeff Hartkopf hartkopf at tramp.Colorado.EDU
Sun Aug 13 10:15:17 AEST 1989


Does anyone have a function or know where I could get one that will convert
a double (or at least a float) to a character string?  It looks like a hard
problem to me, one that would take quite a while to write, and I might never
get it working.  If the double was fairly small (say 8 or 10 digits or so)
the character string should just contain all the digits and decimal point,
but if it was very huge (or very tiny) the string should contain the e+ or e-
representation.

I'd really appreciate any help on this.  Thanks very much.


Jeff Hartkopf

Internet:
hartkopf at tramp.Colorado.EDU



More information about the Comp.lang.c mailing list