printf doesn't chop anything except the decimal portion. It makes sense since 40000 means something very different than 4000 (left-chopped) or 0000 (right-chopped), while 5.123 and 5.12 are similar.
You can still use printf, but you first need to chop it using substr, unpack or some other means.
In reply to Re^3: Length of float using printf
by ikegami
in thread Length of float using printf
by vinaynp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |