However, you could do it this way (though without using sprintf):perl -e 'print sprintf "%f", sprintf "%0.2f", 0.1' 0
Does that help?perl -e 'print 0 + sprintf "%0.2f", 0.001' 0 perl -e 'print 0 + sprintf "%0.2f", 0.1234' 0.12
-- Dan
In reply to Re: Re: sprintf on floating point
by zigdon
in thread sprintf on floating point
by Jaap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |