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 the next .5
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="Jürgen Exner, post: 4837258"] I think you are making this waaaay to complicated. For one I am pretty sure there are modules on CPAN that do floor() and ceiling() functions. And second there are really only three simple cases that you need to distinguish: if the decimal portion is 0 then the shipping weight is the actual weight If 0 < decimal portion <= 0.5 then the shipping weight is the integer part plus 0.5 If 0.5 < decimal portion then the shipping weight is the integer part plus 1 jue [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Rounding up to the next .5
Top