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: John Haque
Subject: Re: [bug-gawk] How does awk implement extremely long integers?
Date: Wed, 1 Feb 2012 11:48:32 -0600
User-agent: Mutt/1.4.2.2i

On Wed, Feb 01, 2012 at 09:27:42AM -0800, address@hidden wrote:
> >
> > I assume the modified gcc has additional format specifiers to print
> > "long" integers?
> 
> I think so.
> 
> > The GNU mpfr library does not have any built-in facility
> > to output "long" integers  what I tell after looking at the online
> > doc.
> 
> Understanding how to support printf formats for MPFR is just one of the
> challenges to adding support for it.

One of many more like hashing for arrays. Have to make sure these
are treated as strings and not numbers. It is highly unlikely that
there will be any benifit of special array types speedwise.

> 
> > BTW, if I am not mistaken, gawk used to print long integers as
> > floating point numbers in the old days. Is this going to be an issue
> > for gawk?


> Yes, in the Olden Days, if a value was out of range for an integer,
> gawk fell back to %g.
And loss of precision.

My google-fu is week today. What is the relationship between gmp and
mpfr libraries. None of these library docs are very explicit about this, and
I found statements which contradicts each other. Also, seems
like other languages have bindings for both.
The gmp library has formatting routines for "long" integers,
but the rest of the stuff looks same as mpfr ???

Thanks,

John




reply via email to

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