Re: Strange problem
Hello,
>All you need is:
>
>function int_round(object a)
> return floor(a+0.5)
>end function
>
>This rounds off to the nearest integer.
>It works for atoms and sequences, negative numbers etc.
But I thought that floor() rounded "toward zero".
If so, then:
floor (-0.9 + 0.5) = 0
right? Or does it always round "down"?
>I mainly allowed non-integers because disallowing them
>would hurt performance slightly. Performance of subscripting is
>very important to most programs.
I agree there.
later,
Lewis Townsend
keroltarr at hotmail.com
http://geocities.com/keroltarr/
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
|
Not Categorized, Please Help
|
|