Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Rounding up to 2 decimal places
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Anno Siegel, post: 4750195"] That (sprintf "%.2f", 0.33 + 0.005) rounds 0.33 up to 0.34, whereas ceil( 100*0.33)/100 is 0.33. This stuff is tricky, and it's best to use the standard library functions if available. Anno [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Rounding up to 2 decimal places
Top