in reply to Re^2: Rounding a number?
in thread Rounding a number?

Of course it will the same, if you use '+1" to it.
That is why i present the plain 'int', using the same number (28.9) to show him that no matter what you have after the '.' it will round it to the smaller number.
so if you add 1 to it, only then it will round it to the bigger number.
Is it so hard to understand this?
of course, if he has more than one numbers in variables, and he wants to check them, he will use '+.5' .
I just gave him an easy way to do what he want..
Sorry, i though i wouldn't have to explain such a simple thing

``The wise man doesn't give the right answers, he poses the right questions.'' TIMTOWTDI

Replies are listed 'Best First'.
Re^4: Rounding a number?
by wazoox (Prior) on Jun 09, 2005 at 12:27 UTC
    It's certainly very easy to understand for you and for me, but it may be not for the one who asked first. So I feel like you really had to explain it after all :)
Re^4: Rounding a number?
by ww (Archbishop) on Jun 09, 2005 at 15:14 UTC
    ummm, well... er...; unless there's an invisible decimal point I can't see, parents discussing addition of ONE are not responsive.

    If one adds 1 (TEN/TENTHS), of course it evals as the next higher number; the example might be more precise if the discussion were about adding ONE/TENTH, 0.1 or adding FIVE/TENTHS (0.5) save for the fact that it just doesn't work that way:

    C:\>perl -e "print (28.6)"
    28.6
    
    C:\>perl -e "print (28.1)"
    28.1
    
    w2k, This is perl, v5.8.6 built for MSWin32-x86-multi-thread (with 3 registered patches, see perl -V for more detail)