diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-08-07 20:14:17 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-08-07 20:14:17 -0700 |
commit | 391abdde2d48aac8fc18978a1f3a26b9f0ae6bc8 (patch) | |
tree | 79506c783370195c69ae42282af76fce0cbbbb62 /txr.1 | |
parent | 78ab514b4f3b481ae006821520c6344768a529b3 (diff) | |
download | txr-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.1 | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -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 ) |