
Sparc
-
Posts
41 -
Joined
-
Last visited
Community Answers
-
Sparc's post in Limiting width of numeric string was marked as the answer
Compare the magnitude of the number and then choose between %f and %_f. At three digits any value between -0.001 and 0.001 would get %f (fixed precision), everything else gets %_f (significant digits). I may be off a zero, but the premise remains.