From 5e1107b94d8dca026a53cf8d8ab6f53d4a01cdac Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 9 Mar 2019 11:48:18 -0800 Subject: 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. --- txr.1 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 ) -- cgit v1.2.3