Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bionet!ames!pacbell!att!ihlpe!jec From: jec@ihlpe.ATT.COM (Morris) Newsgroups: comp.lang.c Subject: method of getting around the rounding of floating and double precision numbers using printf(). Keywords: rounding,methods around Message-ID: <4864@ihlpe.ATT.COM> Date: 12 Jul 89 16:01:08 GMT Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 12 The subject of the inaccuracies caused by rounding has probably been brought up many times in this news group and I apoligize if it has. I need to know of any routines that are currently being used to get around C's rounding of foating point and double precision numbers when using the printf() routine from the stdio.h header file. I have talked to many comrades but none of them can remember how the routine went. I have tried all the usual stuff with the printf() statement [the %*.*f,7,2,variable_name or %4.2f or %.2 etc.,etc.] but none of these techniques were able to get around the rounding when printing these variables. The variables have been declared to be of type float and of type double but to no avail. I would appreciate any responses either by replying directly to this posting or to my email address ...att!ihcae!jec. Thanx in advance.