bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] How does awk implement extremely long integers?


From: Aharon Robbins
Subject: Re: [bug-gawk] How does awk implement extremely long integers?
Date: Tue, 31 Jan 2012 20:50:42 +0200
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

> Date: Tue, 31 Jan 2012 09:03:05 -0600
> From: Peng Yu <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] How does awk implement extremely long integers?
>
> Hi,
>
> I don't see where the limit of an integer in gawk is documented. But I
> tried the following code on my MacBook Pro (64bit) with macports
> installation. It can store integer as large as 2^1023. (I suspect the
> maximum should be something like 2^1024-1, but I never test it). I'm
> wondering how gawk store and compute some big integer, as an integer
> of this large is beyond any native type supported my the machine.

As others have mentioned, awk uses double precision floating point.
Some of the issues are documented in the gawk manual.

> If some library is used to support long integers, why not use one that
> supports infinitely large integer?

Except that it doesn't use such a library.  I would like to, at some
point, but it's definitely major surgery to do so.

Thanks,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]