-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mint-arena: Fix QVM printf %g trailing zero removal
I added support for removing trailing zeros for %g in QVMs in 2015. It's easier to look for differences in lots of debug text without trailing zeros. However it did not work correctly if there are leading zeros or a zero in middle of digits. So fix those and also add support for %#g to disable removing trailing zeros. Still missing exponent notation. Before: printf( %g, 0.000125 ) -> 0.22 printf( %g, 0.125000 ) -> 0.125 printf( %g, 0.001250 ) -> 0.255 printf( %g, 0.000000 ) -> 0 printf( %g, 0.010200 ) -> 0.1 After: printf( %g, 0.000125 ) -> 0.000125 printf( %g, 0.125000 ) -> 0.125 printf( %g, 0.001250 ) -> 0.00125 printf( %g, 0.000000 ) -> 0 printf( %g, 0.010200 ) -> 0.0102
- Loading branch information
1 parent
01726d2
commit 21d91ce
Showing
1 changed file
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters