I guess Cole didn't *mean* to say float, since he is talking of a number
larger than maxinteger... but if the number is a float then if it has
anything right of the decimal point that is *not* a zero or the last digit
before the decimal point is an odd number then it is not divisible by 2.

HTH

Jorge

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of R. Bhakti Klein
Sent: Tuesday, July 17, 2001 12:31 PM
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> Finding If a _huge_ float is divisible by a
number


which means that if there's anything to the right of the decimal point,
it's not evenly divisible by 2.
i think.
--bhakti, prolly overlooking the obvious

Jorge Pena wrote:
>
> I'm not sure what the "evenly" part means. I guess it means that there is
no
> remainder... if that is the case you only need to check if the last digit
in
> the number is even or zero. If it is you know the number is divisible by
2.
>
> HTH
>
> Jorge
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Cole Tierney
> Sent: Tuesday, July 17, 2001 8:57 AM
> To: [EMAIL PROTECTED]
> Subject: Re: <lingo-l> Finding If a _huge_ float is divisible by a
> number
>
> What a coincedence. A coworker of mine just asked me a similar
> question. In this case we have a huge float (greater than maxinteger)
> and need to know if it is evenly divisable by 2. We can not truncate
> the result, since it won't fit into an integer. We'll probably fall
> back on converting to a string and examining that result.
>
> Any thoughts?
>
> Cole


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to