I appreciate all the good suggestions! Especially liked Roy's method 
of paring down the float with the maxinteger.

>it's not cheating if it works.
>- -bh

I couldn't aggree more!

We've actually decided to change the datastructure to use multiple 
integers, instead of a great big float. We can get about 31 bits into 
each. (FWIW, we're packing long lists of booleans for storage in a 
text file.)

Thanks again,
Cole


>so change it to a string, look for the character that immediately
>preceeds the decimal point, and if that character is 0,2,4,6 or 8, it
>divides evenly.
>it's not cheating if it works.
>- -bh
>
>Cole Tierney wrote:
>>
>>  >I'm not sure what the "evenly" part means. I guess it means that 
>>there is no
>>  >remainder...
>>
>>  That's the idea, but not the source of my problem. The number I'm
>>  looking at is larger than the maxInteger, which makes looking at the
>>  remainder tricky.
>>
>>  Here are a few more details:
>>
>>  I've got a very large integer stored in a float, so I know it ends
>>  with .0. If I divide by 2 and the result ends with .5, then I know it
>>  was an odd number. I could convert to a string and look for ".5", but
>>  thats cheating. :)

<snip>

[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