bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] missing function powm and friends


From: Michael Plugge
Subject: Re: [bug-gawk] missing function powm and friends
Date: Mon, 08 Dec 2014 09:49:35 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

Hi Arnold,
just out of curiosity I did a quick test for the powm() function in awk using the built-in GMP routines (-M). It works fine; a test with up to 5000 digits (16600 Bit) for base, exponent and modulus has a running time of just 6.7 s on my laptop (the pure GMP version requires 3.7 s), which is IMHO a very good result. So I'll implement the most-needed functions first in awk, and some time later as extension code.

Best regards

Michael

Am 05.12.2014 um 11:54 schrieb Aharon Robbins:
Hi.

Date: Wed, 03 Dec 2014 22:54:12 +0100
From: Michael Plugge<address@hidden>
To: Aharon Robbins<address@hidden>,address@hidden
CC:address@hidden
Subject: Re: [bug-gawk] missing function powm and friends

Hi Arnold,
thank you for your friendly mai. It was a little laziness to ask for
inclusion of powm() and next_prime() to the basic functions of gawk :-)
- you are right, the gawk function set is compact and limited, and
should remain so. Bundling the functions into an extension is the better
way. Invocation and performance are the same, but the basic function set
is clearly defined and separated from more specialized function sets.
Thanks - I'm glad you understand.  Please do see if you can get
this into gawkextlib.  Andy and I will be working (at some uncommited
rate of speed :-) on beefing up the extension API to handle MPFR
and GMP integers values.

Take care,

Arnold

Attachment: powm.zip
Description: Zip archive


reply via email to

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