summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-08-07 20:14:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-08-07 20:14:17 -0700
commit391abdde2d48aac8fc18978a1f3a26b9f0ae6bc8 (patch)
tree79506c783370195c69ae42282af76fce0cbbbb62 /txr.1
parent78ab514b4f3b481ae006821520c6344768a529b3 (diff)
downloadtxr-391abdde2d48aac8fc18978a1f3a26b9f0ae6bc8.tar.gz
txr-391abdde2d48aac8fc18978a1f3a26b9f0ae6bc8.tar.bz2
txr-391abdde2d48aac8fc18978a1f3a26b9f0ae6bc8.zip
New divides function.
* arith.c (divides): New function. (arith_init): Intrinsic registered. * arith.h (divides): Declared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.129
1 files changed, 29 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index cec90274..e005a34b 100644
--- a/txr.1
+++ b/txr.1
@@ -33713,6 +33713,35 @@ If
.code lcm
has any argument which is zero, it yields zero.
+.coNP Function @ divides
+.synb
+.mets (divides < d << n )
+.syne
+.desc
+The
+.code divides
+function tests whether integer
+.meta d
+divides integer
+.metn n .
+If this is true,
+.code t
+is returned, otherwise
+.codn nil .
+
+The integers 1 and -1 divide every other integer and themselves.
+By established convention, every integer, except zero, divides zero.
+
+For other values,
+.meta d
+divides
+.meta n
+if division of
+.meta n
+by
+.meta d
+leaves no remainder.
+
.coNP Function @ abs
.synb
.mets (abs << number )