Perl-Sensitive Sunglasses | |
PerlMonks |
Re: How do I round a number?by powerman (Friar) |
on Apr 23, 2002 at 11:44 UTC ( [id://161255]=note: print w/replies, xml ) | Need Help?? |
Here shown all round-like functions which exists in perl: This code produce this output: number int printf floor ceil 3.30 3.0 3.3 3.00 4.00 3.50 3.0 3.5 3.00 4.00 3.70 3.0 3.7 3.00 4.00 -3.30 -3.0 -3.3 -4.00 -3.00 -3.50 -3.0 -3.5 -4.00 -3.00 -3.70 -3.0 -3.7 -4.00 -3.00 3.45 3.0 3.5 3.00 4.00
In Section
Seekers of Perl Wisdom
|
|