[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches |
Date: |
Wed, 7 Feb 2018 14:25:53 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
On Tue, Feb 06, 2018 at 10:35:42PM +0100, Hermann Peifer wrote:
> Thanks for taking your time to look after the reported issue. Rebuilding
> with --enable-builtin-intdiv0 and patching the test as you suggested
> gives the expected result:
>
> $ ./gawk -M -f test/mpfrsqrt0.awk
> 11111111111111111111111111111111111111111111111111111111111
> 11111111111111111111111111111111111111111111111111111111111
>
> $ ./gawk -M -f test/mpfrsqrt1.awk
> 11111111111111111111111111111111111111111111111111111111111
> 11111111111111111111111111111111111111111111111111111111111
Thanks. I expected as much.
> Maybe there is something wrong with the intdiv extension on the MacBook
> and I should better rebuild it. I'll do this tomorrow and let you know.
Any luck with that? If not, I think the next step is to figure out where the
calculation is going wrong. Let's patch mpfrsqrt.awk like so:
diff --git a/test/mpfrsqrt.awk b/test/mpfrsqrt.awk
index 8cc416b..b4b3bda 100644
--- a/test/mpfrsqrt.awk
+++ b/test/mpfrsqrt.awk
@@ -29,9 +29,12 @@ function sq_root(x, temp,r,z)
z=0
while (abs(z-temp)>1)
{ z=temp
+ print "Pass #" ++n
intdiv(x,temp,r)
+ print x "/" temp " = " r["quotient"]
temp=r["quotient"] + temp
intdiv(temp,2,r)
+ print temp "/" 2 " = " r["quotient"]
temp=r["quotient"]
}
return temp
On my linux system, I get the attached results from running this command:
bash-4.2$ AWKLIBPATH=extension/.libs ./gawk -M -f test/mpfrsqrt.awk >
/tmp/mpfrsqrt.log
What happens on MacOS?
Thanks,
Andy
mpfrsqrt.log
Description: Text document
- [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Hermann Peifer, 2018/02/06
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Hermann Peifer, 2018/02/06
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Andrew J. Schorr, 2018/02/06
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Andrew J. Schorr, 2018/02/06
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Hermann Peifer, 2018/02/06
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches,
Andrew J. Schorr <=
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Hermann Peifer, 2018/02/07
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Andrew J. Schorr, 2018/02/07
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Andrew J. Schorr, 2018/02/07
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Hermann Peifer, 2018/02/07
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Andrew J. Schorr, 2018/02/07
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Hermann Peifer, 2018/02/08
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Hermann Peifer, 2018/02/07
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Andrew J. Schorr, 2018/02/07
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Hermann Peifer, 2018/02/08
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, arnold, 2018/02/08