floats in (s)printf
- Posted by Mike Burrell <mikpos at USA.NET> Mar 29, 1997
- 921 views
i just noticed that printf and sprintf by default display like 6 digits after the decimal place or something like that with %e, %f and %g... i was wondering it were possible (practical) to have some way of displaying just enough digits that would still give all the accuracy of the number... i.e. if i were to do a printf(1,"%f",5.5) it would print out "5.5", but if i were to do a printf(1,"%f",5.55555555555555555) it would print out that number to 15 decimal places or whatever it is... you know what i'm saying?? okay