your method is good for truncating... course, with a suitable addition of .5 it rounds.perl -e 'printf "%.1f %.1f\n",0.05,0.049' 0.1 0.0
In reply to Re^2: Negative zero? There's gotta be a sprintf that undoes that, right?
by suaveant
in thread Negative zero? There's gotta be a sprintf that undoes that, right?
by rgiskard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |