Re: TIB: Re:


[Prev][Next][Index][Thread]

Re: TIB: Re:




>> I take that back. That would give 2 for 1. Add .9999 or something like
>> that so that 1.2 = 2.1999, giving 2. 1 = 1.9999, giving 1. If you want
>> int to work like round( ,0), add 0.5.
> 
> *buzz* wrong...
> You have to phrase the answer as a question.
> 
> But seriously...That will never do. There is always the incidence of
> 1.00005 for which your method does not account. This can be repeated ad
> infinitum.

You could add 1-(1E-12) which would be at the end of the displayed range,
so it would only be wrong if the number was x.000000000001. Or you could
do it your way (smaller and faster and 100% successful). I like your way
better. Actually, I was thinking about that method, but couldn't remember
whether it worked for int or ipart. I was too lazy to look it up.