Open BillThePlatypus opened 4 years ago
When using printf to print floating point numbers, any zeros between the decimal place and the next non-zero digit are neglected. For example:
printf("%f", .007f)
0.7
printf("%f", 1.07f)
1.7
printf("%f", .701f)
0.701
This is likely because the printf library originally didn't support floating point numbers. Perhaps it is treated as two ints separated by a period?
When using printf to print floating point numbers, any zeros between the decimal place and the next non-zero digit are neglected. For example:
printf("%f", .007f)
outputs0.7
printf("%f", 1.07f)
outputs1.7
printf("%f", .701f)
outputs0.701
(as intended)This is likely because the printf library originally didn't support floating point numbers. Perhaps it is treated as two ints separated by a period?