diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-04-03 09:17:01 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-04-03 09:17:01 +0300 |
commit | 91ac42ccd9bbeee4f17181cd896cc9b7de13b6f7 (patch) | |
tree | 35399cf252627fdbcb0d54d959f9eaf560db7193 /test/mpfrsqrt.awk | |
parent | 3fad6ad12e1637c4e1b72fbeaf0265f44da0cf27 (diff) | |
parent | ddc290584b39bab2c1edcec935a31ea12d343246 (diff) | |
download | egawk-91ac42ccd9bbeee4f17181cd896cc9b7de13b6f7.tar.gz egawk-91ac42ccd9bbeee4f17181cd896cc9b7de13b6f7.tar.bz2 egawk-91ac42ccd9bbeee4f17181cd896cc9b7de13b6f7.zip |
Merge branch 'master' into wasted-byte
Diffstat (limited to 'test/mpfrsqrt.awk')
-rw-r--r-- | test/mpfrsqrt.awk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/mpfrsqrt.awk b/test/mpfrsqrt.awk index 23a15c92..3fb1f5f8 100644 --- a/test/mpfrsqrt.awk +++ b/test/mpfrsqrt.awk @@ -14,7 +14,7 @@ a=11111111111111111111111111111111111111111111111111111111111 print sqrt(a^2) #print sq_root(a^2) -# ADR: Added for gawk-4.1-stable which doesn't have built-in div() function +# ADR: Added for gawk-4.1-stable which doesn't have built-in intdiv() function if (PROCINFO["version"] < "4.1.60") print sq_root2(a^2) else @@ -27,9 +27,9 @@ function sq_root(x, temp,r,z) z=0 while (abs(z-temp)>1) { z=temp - div(x,temp,r) + intdiv(x,temp,r) temp=r["quotient"] + temp - div(temp,2,r) + intdiv(temp,2,r) temp=r["quotient"] } return temp |