Path: utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!rutgers!att!akgua!brb From: brb@akgua.ATT.COM (Brian R. Bainter) Newsgroups: comp.lang.c Subject: Problem with Turbo C and floating point Message-ID: <1817@akgua.ATT.COM> Date: 15 Aug 88 13:19:33 GMT Organization: AT&T Network Systems/Bell Labs, Atlanta GA Lines: 24 I hope someone can tell me what I am doing wrong or at least (heaven forbid) what the compiler is doing strange. I have an application where I have a data entry field. The field is labeled as a floating point field, however it is entered into a string variable. No problem yet. When I load this "floating point" string into a float with a sscanf, I do have a sort of problem. If the number in the string is for example 9999999.99 it ends up in the float as 10000000.00000 and a number entered as 1111111.11 ends up in the float as 1111111.12500. If anyone could enlighten my mind as to what I am doing wrong, or what the compiler is doing wrong and possibly give me a work around, I would be most greatful. BTW: my compiler is Turbo C 1.5. Thanks in advance for any help -- Brian R. Bainter KA7TXA AT&T Technologies Atlanta Works {cbosgd, gatech, ihnp4, moss, mtune, ulysses}akgua!brb