For %f with zero precision, omit decimal point and round to integer.
For example:
printf("%*.f",-14,321.7654321); The true output is "322" intead of "321"
Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
Set default precision to 1 for %.g when precision is 0.
For example:
printf("%.g",-0.01); the true output is "-0.01" intead of "-0.0"
printf("%.g",1.4); the true output is "1" intead of "1.4"
Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
The '#' format flag retains trailing zeros and the decimal point
For example:
printf("%#g",5.0000001); the true output is "5.000000" intead of "5.".
Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
When a negative precision is passed in the format specifier of printf,
the printed result does not comply with POSIX requirements.
For example:
printf("%.*f",-4,321.7654321); the true output is "321.765432" intead of "321"
printf("%*.*s",-14,-15,"test-string"); the true output is "test-string " intead of "test-s "
Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
Implement POSIX standard %a and %A format specifiers.
These specifiers output floating-point numbers in hexadecimal scientific notation, e.g., 0x1.ffffp+127.
Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>