https://bugs.kde.org/show_bug.cgi?id=496398
Bug ID: 496398 Summary: printf changed between RELEASE=24.10 and RELEASE=24.04 Classification: I don't know Product: kde Version: unspecified Platform: Kubuntu OS: Linux Status: REPORTED Severity: major Priority: NOR Component: general Assignee: unassigned-b...@kde.org Reporter: kde....@linwin.com Target Milestone: --- core utility printf does not handle decimal parts of numeric values correctly. Instead of decimal part of a variable it just dumps this text "-nan" Previous printf version works fine. Example in bash environment on 2 systems: ===== system 1 $> cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.10 DISTRIB_CODENAME=oracular DISTRIB_DESCRIPTION="Ubuntu 24.10" $> ll /bin/printf -rwxr-xr-x 1 root root 59992 Jul 31 08:24 /bin/printf ----- $> price='123.4387' $> count=1200 $> printf "%.2f %4d\n" $price $count -nan 1200 $> printf "%.5d %.2f\n" $count $price 01200 -nan ===== system 2 $> cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.04 DISTRIB_CODENAME=noble DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS" $> ll /bin/printf -rwxr-xr-x 1 root root 55744 Apr 5 2024 /bin/printf ----- $> testVar=8753.2893 $> count=734 $> printf "%5d %.2f\n" $count $testVar 734 8753.29 $> ./printf "%5d %.2f\n" $count $testVar 734 8753.29 Note dot slash is printf from the "other system" in both cases. Rounding numbers works fine. What changed in printf program between April and October? $> diff /bin/printf printf Binary files /bin/printf and printf differ $> ll /bin/printf printf -rwxr-xr-x 1 root root 55744 Apr 5 2024 /bin/printf -rwxr-xr-x 1 raffi raffi 59992 Nov 17 12:41 printf -- You are receiving this mail because: You are watching all bug changes.