summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-03-09 11:48:18 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-03-09 11:48:18 -0800
commit5e1107b94d8dca026a53cf8d8ab6f53d4a01cdac (patch)
treee0f71bc00806b96ecbbb3dc42bcaf6fa9357e77f /txr.1
parent285e3a5c375774135c29c6b7ff3b4b811b6cacd1 (diff)
downloadtxr-5e1107b94d8dca026a53cf8d8ab6f53d4a01cdac.tar.gz
txr-5e1107b94d8dca026a53cf8d8ab6f53d4a01cdac.tar.bz2
txr-5e1107b94d8dca026a53cf8d8ab6f53d4a01cdac.zip
doc: document division by zero.
* txr.1: Document that floor, mod, floor-rem and other functions in this family throw an exception if the divisor is zero.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.117
1 files changed, 17 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 4f580588..9571db98 100644
--- a/txr.1
+++ b/txr.1
@@ -35805,6 +35805,11 @@ If the
.meta divisor
is omitted, it defaults to 1.
+A zero
+.meta divisor
+results in an exception of type
+.codn numeric-error .
+
If both inputs are integers,
the result is of type integer.
@@ -35897,6 +35902,13 @@ then generalized into the floating point domain. For instance the expression
yields a residue of 0.25 because 0.5 "goes into" 0.75 only
once, with a "remainder" of 0.25.
+If
+.meta divisor
+is zero,
+.code mod
+throws an exception of type
+.codn numeric-error .
+
.coNP Functions @, trunc-rem @, floor-rem @ ceil-rem and @ round-rem
.synb
.mets (trunc-rem < dividend <> [ divisor ])
@@ -35935,6 +35947,11 @@ value obeys the following identity:
.mets (eql < remainder (- < dividend >> (* divisor << quotient )))
.cble
+If
+.meta divisor
+is zero, these functions throw an exception of type
+.codn numeric-error .
+
.coNP Functions @, sin @, cos @, tan @, asin @, acos @ atan and @ atan2
.synb
.mets (sin << radians )