printf (awk,perl,shell) float rounding issue

view story

http://www.unix.com – Hi guys, could someone throw some light on the following behaviour of printf (I'll start with info about the system and the tool/shell/interpreter versions)?: Code: $ uname -a Linux linux-86if.site 3.1.0-1.2-desktop #1 SMP PREEMPT Thu Nov 3 14:45:45 UTC 2011 (187dde0) x86_64 x86_64 x86_64 GNU/Linux $ bash --version GNU bash, version 4.2.10(1)-release (x86_64-suse-linux-gnu) $ awk --version GNU Awk 4.0.0 $ perl --version This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-thread-multi $ ksh ### using ksh now $ echo ${.sh.version} Version JM 93t+ 2010-06-21 (HowTos)