[Top][All Lists]

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

Re: Support of log10?

From: Peng Yu
Subject: Re: Support of log10?
Date: Thu, 24 Jun 2021 09:03:52 -0500

On 6/24/21, arnold@skeeve.com <arnold@skeeve.com> wrote:
> 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.

How do you justify nobody else would think it is reasonable to include
log10 and possible other math functions in math.h?

> 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.

I can ask the same question. Why not include it in awk core? Why
people have to write their own extensions for those trivial functions?

>         (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]