diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-04-16 11:08:04 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-04-16 11:08:04 +0300 |
commit | 852a9bd02415747bce315e14401ec42046c36a03 (patch) | |
tree | ba2d517718c84eddc8381c82ed57b4eff9d99bbd /doc/gawk.texi | |
parent | 66c19316fa004ddafde9ceab7b9e374fb97e0fc3 (diff) | |
parent | 67f4d070335e12622af1363b71c68489c64f5bc7 (diff) | |
download | egawk-852a9bd02415747bce315e14401ec42046c36a03.tar.gz egawk-852a9bd02415747bce315e14401ec42046c36a03.tar.bz2 egawk-852a9bd02415747bce315e14401ec42046c36a03.zip |
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r-- | doc/gawk.texi | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi index 8b872e9d..fa8c6664 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -17461,13 +17461,17 @@ is @minus{}3, and @code{int(-3)} is @minus{}3 as well. @item @code{intdiv(@var{numerator}, @var{denominator}, @var{result})} @cindexawkfunc{intdiv} @cindex intdiv -Perform integer division, similar to the standard C function of the -same name. First, truncate @code{numerator} and @code{denominator} +Perform integer division, similar to the standard C @code{div()} function. +First, truncate @code{numerator} and @code{denominator} towards zero, creating integer values. Clear the @code{result} array, and then set @code{result["quotient"]} to the result of @samp{numerator / denominator}, truncated towards zero to an integer, and set @code{result["remainder"]} to the result of @samp{numerator % -denominator}, truncated towards zero to an integer. This function is +denominator}, truncated towards zero to an integer. +Attempting division by zero causes a fatal error. +The function returns zero upon success, and @minus{}1 upon error. + +This function is primarily intended for use with arbitrary length integers; it avoids creating MPFR arbitrary precision floating-point values (@pxref{Arbitrary Precision Integers}). |