bug-gawk
[Top][All Lists]
Advanced

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

Re: complie with mpfr support


From: Ivan Molineris
Subject: Re: complie with mpfr support
Date: Thu, 11 Feb 2021 10:57:55 +0100

This answer makes me very sad.
I very appreciate your work and I would like to continue using gawk in data
science.
But if you think the inclusion of MPFR was a mistake you probably do not
think that gawk has a future in my field of work, probably I should
re-implement many of its features in python.

Thanks for the advice.



On Thu, Feb 11, 2021 at 10:48 AM <arnold@skeeve.com> wrote:

> Hi.
>
> Ivan Molineris <ivan.molineris@gmail.com> wrote:
>
> > Arnold pointed me to the PERC variable. The unexpected behavior that now
>
> PREC :-)
>
> > seems solved with -M, is only shifted to a smaller number.
> >
> > $ echo 1.8e-508 | gawk -M '$1<0.05 {print "true"}'
> > does not print true
> >
> > So my question is: what is the biggest number that will fail the above
> > test, even if in theory is lower than 0.05?
>
> MPFR provides arbitrary precision, based on the setting of PREC.
> So I don't think there is a single answer to your question.
>
> MPFR is not a panacea, nor is it magical. You need to understand
> floating point math to understand how it works. The gawk manual has
> some explicative text, but it is probably not enough, since I don't
> have a deep understanding of these issues.
>
> If you want "bignums" you may be better off using Python and one
> of its packages than MPFR and gawk.
>
> MPFR support was contributed by a developer who left the project 8+
> years ago. In retrospect, adding it was a mistake. But it's too late to
> remove it, so I do the best I can to make it work well.
>
> Sorry,
>
> Arnold
>


reply via email to

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