Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get %g format closer to correct.
  • Loading branch information
colomon committed Jul 6, 2012
1 parent 4b9c017 commit 7559ad4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/Printf.cs
Expand Up @@ -276,12 +276,7 @@ private struct PrintfFormat {
number = f.ToString("e" + format.precision);
break;
case PrintfDirective.FloatEF:
log = Math.Log(Math.Abs(f), 10);
if (log < -5 || log > 5) {
number = f.ToString("e" + format.precision);
} else {
number = f.ToString("F" + format.precision);
}
number = f.ToString("g" + format.precision);
break;
}

Expand Down

0 comments on commit 7559ad4

Please sign in to comment.