[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Support of log10? (Peng Yu)
From: |
Peng Yu |
Subject: |
Re: Support of log10? (Peng Yu) |
Date: |
Mon, 16 Aug 2021 10:40:39 -0500 |
-M is not an option in my case.
On 8/15/21, J Naman <jnaman2@gmail.com> wrote:
> I think that you may find your answer in
> *Chap 16 Arithmeticand Arbitrary-Precision Arithmetic*, which is a feature
> available only in gawk. The default precision of Float doubles
> is 53 bits (15 decimal places). If that causes you problems for log(10),
> then you have the same problem everywhere in your code that you use
> floating point arithmetic.
> I have used PREC=118 up to 500 bits for testing some algorithms.
> However, you *MUST *use the *Gawk -M command-line option *to use
> the GNU MPFR and GNU MP (GMP) libraries for arbitrary
> precision arithmetic on numbers.
> Two predefined variables, PREC and ROUNDMODE, provide
> control over the working precision and the rounding mode.
> The precision and the rounding mode are set globally for
> every operation to follow.
> See Section 16.4.4 [Setting the Precision], page 374,
> and Section 16.4.5 [Setting the Rounding Mode], page 375,
> for more information.
>
--
Regards,
Peng