bug-gawk
[Top][All Lists]
Advanced

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

Re: Support of log10?


From: arnold
Subject: Re: Support of log10?
Date: Thu, 24 Jun 2021 00:06:36 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Peng Yu <pengyu.ut@gmail.com> wrote:

> Is it worthwhile to consider the support of log10 in gawk?

No.

Let me be very clear:

        Gawk is not going to change to suit your personal needs
        or how you think it should work. Period.

The sooner you understand and accept this fact, the better it
will be.

Given this fact, I think you have at least the following alternatives:

1. Give up on gawk and move to a more capable environment such as
   Perl, Python, or Ruby.  I personally believe that in the long term
   this is the correct choice for you, but you would have to make this
   decision.

2. Learn how the tool of your choice--gawk--works (by reading the manual)
   and accept its capabilities and limitations.

   In this particular case, you have at least these two subchoices:

     A. Decide what is more important to you: Accuracy (use -M) or
        effciency (don't use -M).  You're not going to get both out
        of the box.

     B. Write a loadable extension in C that calls the math library's
        log10() function. The manual explains how to do this. This
        would be a very simple extension that should not take long
        to write.

        (If you cannot do this or find someone to do it for you,
        I would be happy to discuss my consulting rates and conditions,
        off of the list.)

Arnold



reply via email to

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