bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] GAWK 4.1.60 DIV() Remainder Bug


From: Aharon Robbins
Subject: Re: [bug-gawk] GAWK 4.1.60 DIV() Remainder Bug
Date: Tue, 05 Aug 2014 17:51:34 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hi Andy.

> > In the worst case, I'll just switch out to use the div_mod function that
> > div() uses, but I'd like to try for a bit to understand why mpz_mod
> > isn't working.
>
> Please keep in mind that '%' works with floating-point values, whereas
> div is restricted to integers.  So you can't simply use the same code
> for both.

Yes. I meant 'switch out for the integer operation' which is what I did.
Or better, 'replace use of mpz_mod with mpz_tdiv_qr'.

Anyway, I've just pushed the changes, along with test cases.

Thanks,

Arnold



reply via email to

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