[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 15:16:01 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Feb 07, 2018 at 03:09:09PM -0500, Andrew J. Schorr wrote:
> This looks like a precision problem. On Linux:
>
> bash-4.2$ echo
> 123456790123456790123456790123456790123456790123456790123454320987654320987654320987654320987654320987654320987654321
> 1234567901234567901234567901234567901234567901234567901234 | ./gawk -M
> '{printf "%d\n", $1/$2}'
> 99999999999999997168788049560464200849936328366177157906432
This is interesting:
bash-4.2$ echo
123456790123456790123456790123456790123456790123456790123454320987654320987654320987654320987654320987654320987654321
1234567901234567901234567901234567901234567901234567901234 | ./gawk -M -l
extension/.libs/intdiv.so '{printf "%d\n", $1/$2; intdiv($1, $2, r); print
r["quotient"]}'
99999999999999997168788049560464200849936328366177157906432
100000000000000000000000000000000000000000000000000000000044
So the intdiv function seems to operate using higher precision. I imagine you
get
the same answer for both on MacOS...
Regards,
Andy
- [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, 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,
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, 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
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, arnold, 2018/02/08
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, Andrew J. Schorr, 2018/02/08
- Re: [bug-gawk] macOS: mpfrsqrt check fails on gawk-4.2-stable and master branches, arnold, 2018/02/08