diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:36 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:36 -0800 |
commit | 5bea21e81ed516440e34e480f2c33ca41aa8c597 (patch) | |
tree | 653ace1b8fe0a9916d861d35ff8f611b46c80d37 /math-integer.txi | |
parent | 237c6e380aebdcbc70bd1c9ecf7d3f6effca2752 (diff) | |
download | slib-upstream/3a4.tar.gz slib-upstream/3a4.zip |
Import Upstream version 3a4upstream/3a4
Diffstat (limited to 'math-integer.txi')
-rw-r--r-- | math-integer.txi | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/math-integer.txi b/math-integer.txi new file mode 100644 index 0000000..b626a33 --- /dev/null +++ b/math-integer.txi @@ -0,0 +1,38 @@ +@code{(require 'math-integer)} +@ftindex math-integer + + +@defun integer-expt n1 n2 + +Returns @var{n1} raised to the power @var{n2} if that result is an exact +integer; otherwise signals an error. + +@code{(integer-expt 0 @var{n2})} + +returns 1 for @var{n2} equal to 0; +returns 0 for positive integer @var{n2}; +signals an error otherwise. +@end defun + + +@defun integer-log base k + +Returns the largest exact integer whose power of @var{base} is less than or +equal to @var{k}. If @var{base} or @var{k} is not a positive exact integer, then +@code{integer-log} signals an error. +@end defun + + +@defun integer-sqrt k + +For non-negative integer @var{k} returns the largest integer whose square +is less than or equal to @var{k}; otherwise signals an error. +@end defun + + +@defvar quotient +@defvarx remainder +@defvarx modulo + +are redefined so that they accept only exact-integer arguments. +@end defvar |