summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.122
1 files changed, 21 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 2c467d22..b81fc0b1 100644
--- a/txr.1
+++ b/txr.1
@@ -18250,11 +18250,12 @@ A character may not be an operand of multiplication.
.PP
-.coNP Functions @, / @ trunc and @ mod
+.coNP Functions @, / @ trunc, @ mod and @ trunc-rem
.synb
.mets (/ <> [ dividend ] << divisor )
.mets (trunc < dividend << divisor )
.mets (mod < dividend << divisor )
+.mets (trunc-rem < dividend << divisor )
.syne
.desc
The arguments to these functions are numbers. Characters are not permitted.
@@ -18308,6 +18309,25 @@ 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.
+The
+.code trunc-rem
+function returns a list of two values: a
+.meta quotient
+and a
+.metn remainder.
+The
+.meta quotient
+is exactly the same value as what
+.code trunc
+would return for the same inputs.
+The
+.meta remainder
+obeys the following identity:
+
+.cblk
+.mets (eql < remainder (- < dividend >> (* divisor << quotient )))
+.cble
+
.coNP Functions @ wrap and @ wrap*
.synb
.mets (wrap < start < end << number )