You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt::printf("Zero is '%19.0Lf'\n", 0.0L);
fmt::printf("Zero is '%19.0Lf'\n", 0.0);
fmt::printf("Zero is '%19.0f'\n", 0.0);
fmt::printf("0.1 is '%19.0f'\n", 0.1);
fmt::printf("1.1 is '%19.0f'\n", 1.1);
fmt::printf("0.01 is '%19.0f'\n", 0.01);
fmt::printf("1.01 is '%19.0f'\n", 1.01);
fmt::printf("0.11 is '%19.0f'\n", 0.11);
fmt::printf("1.11 is '%19.0f'\n", 1.11);
fmt::printf("-0.1 is '%19.0f'\n", -0.1);
fmt::printf("-1.1 is '%19.0f'\n", -1.1);
fmt::printf("-0.01 is '%19.0f'\n", -0.01);
fmt::printf("-1.01 is '%19.0f'\n", -1.01);
fmt::printf("-0.11 is '%19.0f'\n", -0.11);
fmt::printf("-1.11 is '%19.0f'\n", -1.11);
With 4.1.0 the result is OK:
Zero is ' 0'
Zero is ' 0'
Zero is ' 0'
0.1 is ' 0'
1.1 is ' 1'
0.01 is ' 0'
1.01 is ' 1'
0.11 is ' 0'
1.11 is ' 1'
-0.1 is ' -0'
-1.1 is ' -1'
-0.01 is ' -0'
-1.01 is ' -1'
-0.11 is ' -0'
-1.11 is ' -1'
But whith 5.3 the result is:
Zero is ' 0'
Zero is ' ' (wrong!)
Zero is ' ' (wrong!)
0.1 is ' 0'
1.1 is ' 1'
0.01 is ' 0.0' (wrong!)
1.01 is ' 1'
0.11 is ' 0'
1.11 is ' 1'
-0.1 is ' -0'
-1.1 is ' -1'
-0.01 is ' -0.0' (wrong!)
-1.01 is ' -1'
-0.11 is ' -0'
-1.11 is ' -1'
Can you, please, fix this?
The text was updated successfully, but these errors were encountered:
Great catch, thanks! Should be fixed now. Note that it's a bug in the development (master) branch, the released version 5.3.0 gives the correct output.
Hi! I have this test code:
fmt::printf("Zero is '%19.0Lf'\n", 0.0L);
fmt::printf("Zero is '%19.0Lf'\n", 0.0);
fmt::printf("Zero is '%19.0f'\n", 0.0);
fmt::printf("0.1 is '%19.0f'\n", 0.1);
fmt::printf("1.1 is '%19.0f'\n", 1.1);
fmt::printf("0.01 is '%19.0f'\n", 0.01);
fmt::printf("1.01 is '%19.0f'\n", 1.01);
fmt::printf("0.11 is '%19.0f'\n", 0.11);
fmt::printf("1.11 is '%19.0f'\n", 1.11);
fmt::printf("-0.1 is '%19.0f'\n", -0.1);
fmt::printf("-1.1 is '%19.0f'\n", -1.1);
fmt::printf("-0.01 is '%19.0f'\n", -0.01);
fmt::printf("-1.01 is '%19.0f'\n", -1.01);
fmt::printf("-0.11 is '%19.0f'\n", -0.11);
fmt::printf("-1.11 is '%19.0f'\n", -1.11);
With 4.1.0 the result is OK:
Zero is ' 0'
Zero is ' 0'
Zero is ' 0'
0.1 is ' 0'
1.1 is ' 1'
0.01 is ' 0'
1.01 is ' 1'
0.11 is ' 0'
1.11 is ' 1'
-0.1 is ' -0'
-1.1 is ' -1'
-0.01 is ' -0'
-1.01 is ' -1'
-0.11 is ' -0'
-1.11 is ' -1'
But whith 5.3 the result is:
Zero is ' 0'
Zero is ' ' (wrong!)
Zero is ' ' (wrong!)
0.1 is ' 0'
1.1 is ' 1'
0.01 is ' 0.0' (wrong!)
1.01 is ' 1'
0.11 is ' 0'
1.11 is ' 1'
-0.1 is ' -0'
-1.1 is ' -1'
-0.01 is ' -0.0' (wrong!)
-1.01 is ' -1'
-0.11 is ' -0'
-1.11 is ' -1'
Can you, please, fix this?
The text was updated successfully, but these errors were encountered: