1. RE: Big Integer Atoms

Hi, Igor.
Once I had the same doubt, and I made a program to test it.
It ran as follows:
try larger and larger atoms with integer values higher than 2^30, add 1 to
them, and test both numbers for equality. When N = N + 1, you have reached
the limit.
If I recall well, this gave me a limit of 53 bits.
Regards.
----- Original Message -----
From: Igor Kachan <kinz at peterlink.ru>
To: <EUforum at topica.com>
Sent: Sunday, July 11, 2004 10:39 AM
Subject: Big Integer Atoms


>
>
> Hi, dear Euphorians,
>
> The EU manual says:
>
> "... Those declared with type integer must be atoms
> with integer values from -1073741824 to +1073741823
> inclusive.
> You can perform exact calculations on larger integer
> values, up to about 15 decimal digits, but declare
> them as atom, rather than integer ..."
>
> This "up to about 15 decimal digits" seems to be not
> enough concrete thing for some cases.
>
> Couldn't someone tell me about more precise
> bounds of these "larger integer values"?
>
> Thanks!
>
> Regards,
> Igor Kachan
> kinz at peterlink.ru
>
>
>
>

new topic     » topic index » view message » categorize

2. RE: Big Integer Atoms

Hi Igor and Ricardo,

Yes, i too have found 2^53 as the final whole number representable
as an atom in Euphoria.
I've also submitted a program to the archives to test for this
number anyway, and it finds it in 84 iterations or less
(less if you start with a smaller number) so it's done in
under a second.
It's a semi linear technique, and i suspect that a log search
using hex would be even faster, but what the heck, you only have
to run it once smile

Igor:
Your prng is very nice, and flat too smile

Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu