summaryrefslogtreecommitdiffstats
path: root/doc/mathop.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/mathop.n')
-rw-r--r--doc/mathop.n17
1 files changed, 10 insertions, 7 deletions
diff --git a/doc/mathop.n b/doc/mathop.n
index 6ac7b8e..ac2ebc1 100644
--- a/doc/mathop.n
+++ b/doc/mathop.n
@@ -4,8 +4,6 @@
.\" See the file "license.terms" for information on usage and redistribution
.\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
.\"
-.\" RCS: @(#) $Id: mathop.n,v 1.13 2010/06/30 23:29:26 dkf Exp $
-.\"
.so man.macros
.TH mathop n 8.5 Tcl "Tcl Mathematical Operator Commands"
.BS
@@ -128,14 +126,19 @@ will be an integer.
.TP
\fB%\fR \fInumber number\fR
.
-Returns the integral modulus of the first argument with respect to the second.
-Each \fInumber\fR must have an integral value. Note that Tcl defines this
-operation exactly even for negative numbers, so that the following equality
-holds true:
+Returns the integral modulus (i.e., remainder) of the first argument
+with respect to the second.
+Each \fInumber\fR must have an integral value.
+Also, the sign of the result will be the same as the sign of the second
+\fInumber\fR, which must not be zero.
.RS
.PP
+Note that Tcl defines this operation exactly even for negative numbers, so
+that the following command returns a true value (omitting the namespace for
+clarity):
+.PP
.CS
-(\fIx \fB/ \fIy\fR) \fB* \fIy \fB== \fIx \fB-\fR (\fIx \fB% \fIy\fR)
+\fB==\fR [\fB*\fR [\fB/\fI x y\fR] \fIy\fR] [\fB\-\fI x\fR [\fB%\fI x y\fR]]
.CE
.RE
.TP