klamath
11-14-2000, 08:35 PM
I'm using printf() to print some numbers (in 'double' format). I want to print as many zeros as are necessary, but no more. If no zeros are necessary, I don't want to print a period after the digit in the ones column. For instance:
5.0000000000 -> 5
5.0005000000 -> 5.0005
5.5000000000 -> 5
(I'm guessing the number of zeros included by default, I can't remember).
How would one do this?
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the BBB (http://bbb.sourceforge.net)
5.0000000000 -> 5
5.0005000000 -> 5.0005
5.5000000000 -> 5
(I'm guessing the number of zeros included by default, I can't remember).
How would one do this?
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the BBB (http://bbb.sourceforge.net)