in reply to Re: Rounding to the nearest 50
in thread Rounding to the nearest 50

but that is not, what the OP wanted (151->200)

Replies are listed 'Best First'.
Re: Rounding to the nearest 50
by Abigail-II (Bishop) on Mar 01, 2004 at 16:10 UTC
    You're right. He must have another definition of 'nearest' than I have.

    Abigail

      Thank you all very much. I am dealing with currency (0 - 10000000). I am sure something in this post will set me straight. Thank you all again very much.
      Yes, I agree. I wrote him in my answer above, that he is not looking for the nearest value (or that, what I would tell the nearest).
        You are all correct, I left out a minor piece. I am rounding to the neared number equally divisible by 50 without having to round down. Always round up.
      Perhaps he really meant "nearest 100" but jumbled that with the notion that anything within 50 would round to it.

      The PerlMonk tr/// Advocate