Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Wow, that's quite a scratchpad, thanks.
So, I hadn't thought much about negative numbers. Is it mathematically correct for the ceiling function to go to the next more negative number (to the left on a number line) or to truncate (ie int) a negative number (move toward the right on a number line)? I think the rounding functions for negative numbers are correct (don't need adjusting), you're simply moving toward the nearest whole number... -Scott Update: As further discussed below, the code did originally have issues, the code in the answer above has now been replaced by working code. In reply to Re^2: Answer: How do I round a number?
by 5mi11er
|
|