coreutils
coreutils copied to clipboard
printf: Binary numbers (`0b...`) should not be allowed for float formats
Decimal parsing is fine:
$ env printf "%d\n" 0b100
4
$ cargo run printf "%d\n" 0b100
4
But binary format should not be allowed for floats (just like octal is already disallowed):
$ env printf "%f\n" 0b100
printf: ‘0b100’: value not completely converted
0.000000
$ cargo run printf "%f\n" 0b100
4.000000