|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: Padding with sprintf changing numberby choroba (Cardinal) |
| on Sep 24, 2021 at 11:17 UTC ( [id://11136983]=note: print w/replies, xml ) | Need Help?? |
|
I tried it with 1/3:
As expected, before padding its 0.333333333333333, after padding it's 0000000000000000. Rounding. Now try it with 1.999999999999999. print doesn't output the precise value.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||