Closed niewim19 closed 1 year ago
Printing floating point values larger than 2^20 results in wrong number printed (checked on ia32-generic)
Test code:
printf("%f\n", 1048575.F); /* 2^20 - 1 */ printf("%f\n", 1048576.F); /* 2^20 */ printf("%f\n\n", 1048577.F); /* 2^20 + 1 */ printf("%f\n", 1048575.); /* 2^20 - 1 */ printf("%f\n", 1048576.); /* 2^20 */ printf("%f\n", 1048577.); /* 2^20 + 1 */
results in:
1048575.000000 1048576.000000 1099511627777.000000 1048575.000000 1048576.000000 1099511627777.000000
Issue forces changes in tests proposed in
Mention of pull-request which extends support for %f (float, doubles) -> https://github.com/phoenix-rtos/libphoenix/pull/228
%f
Fixed in:
Test scenario:
Printing floating point values larger than 2^20 results in wrong number printed (checked on ia32-generic)
Test case:
Test code:
results in: