mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-05 18:55:21 +00:00
The precision parameter to the %g conversion indicates the maximum number of significant digits and not the number of digits to appear after the radix character. Here's a few examples this patch fixes: expected before ---------------------------------------------------------- printf("%.3g", 150.12) 150 150.12 printf("%.2g", 150.1) 1.5e+02 150.1 printf("%#.3g", 150.) 150. 150.000 printf("%#.2g", 15e-5) 0.00015 0.00 printf("%#.4g", 1505e-7) 0.0001505 0.0002 printf("%#.4g", 1505e-8) 1.505e-05 1.5050e-05 Signed-off-by: Nicolas Pitre <npitre@baylibre.com> |
||
---|---|---|
.. | ||
cmsis_rtos_v1 | ||
cmsis_rtos_v2 | ||
gui | ||
libc | ||
os | ||
posix | ||
updatehub | ||
CMakeLists.txt | ||
Kconfig |