fltfmt: %.0g should print with one significant figure
This commit is contained in:
parent
3d908529e9
commit
1a88844069
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ found:
|
||||||
* c3 digits of trailing '0'
|
* c3 digits of trailing '0'
|
||||||
* c4 digits after '.'
|
* c4 digits after '.'
|
||||||
*/
|
*/
|
||||||
if(chr == 'g') /* Significant figures. */
|
if(chr == 'g' && prec > 0) /* Significant figures. */
|
||||||
prec--;
|
prec--;
|
||||||
c1 = 0;
|
c1 = 0;
|
||||||
c2 = prec + 1;
|
c2 = prec + 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue