[comp.lang.c] Truncating a double float

hinkle@acsu.buffalo.edu (steven j hinkle) (02/18/91)

   I would like to know if there is a good, "clean" way to truncate
a double float in C to a certain (given) accuracy point. 

   Example : I want to truncate a double to the tenth decimal point.

Anyone got a good idea how I can do this so that my code is portable?

Any help would be appreciated.

Steven Hinkle


-- 
|  Steven Hinkle   "The Quaker"       |  Always look on the bright side.|
|  University of Buffalo              |  If there isn't one, check the  |
|  INTERNET : hinkle@acsu.buffalo.edu |  light bulb, it is probably     |
|  BITNET   : hinkle@sunybcs          |  burned out.                    |