home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!netnews!bandy
- From: bandy@netnews.jhuapl.edu (Mike Bandy)
- Subject: Re: HELP!!! Converting strings to floats....
- Message-ID: <BxBz66.GDw@netnews.jhuapl.edu>
- Organization: JHU/Applied Physics Laboratory
- References: <29OCT199209275328@summa.tamu.edu>
- Date: Sat, 7 Nov 1992 05:27:42 GMT
- Lines: 17
-
- gtb6038@summa.tamu.edu (BILES, GREG THOMAS) writes:
-
- >My major CPSC project is due today, and I have one big problem. I have a
- >string that contains some number, ex 43.23489. And, I want to convert that to
- >a float. I have tried to write it to a file and then read it in as a float,
- >but it just adds some small number to the end. For instance, 324.234 would
- >be read in as 324.23398342! Thanks for any help in advance!
-
- You're at the limits of a single precision number. Either display fewer chars
- on output of use a double precision number.
-
-
- --
-
- Mike Bandy
- bandy@aplcomm.jhuapl.edu
- Johns Hopkins University / Applied Physics Lab
-