Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!mailrus!ncar!boulder!tramp!hartkopf
From: hartkopf@tramp.Colorado.EDU (Jeff Hartkopf)
Newsgroups: comp.lang.c
Subject: converting a float to a character string
Message-ID: <10720@boulder.Colorado.EDU>
Date: 13 Aug 89 00:15:17 GMT
Sender: news@boulder.Colorado.EDU
Reply-To: hartkopf@tramp.Colorado.EDU (Jeff Hartkopf)
Organization: University of Colorado, Boulder
Lines: 15

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@tramp.Colorado.EDU