summaryrefslogtreecommitdiffstats
path: root/doc/expr.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/expr.n')
-rw-r--r--doc/expr.n23
1 files changed, 20 insertions, 3 deletions
diff --git a/doc/expr.n b/doc/expr.n
index 5fb3cee..4a3674f 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: expr.n,v 1.5 2000/09/07 14:27:47 poenitz Exp $
+'\" RCS: @(#) $Id: expr.n,v 1.5.12.1 2001/10/12 12:58:48 dkf Exp $
'\"
.so man.macros
.TH expr n 8.4 Tcl "Tcl Built-In Commands"
@@ -55,6 +55,13 @@ If no numeric interpretation is possible, then an operand is left
as a string (and only a limited set of operators may be applied to
it).
.PP
+.VS 8.4
+On 32-bit systems, integer values MAX_INT (0x7FFFFFFF) and MIN_INT
+(-0x80000000) will be represented as 32-bit values, and integer values
+outside that range will be represented as 64-bit values (if that is
+possible at all.)
+.VE 8.4
+.PP
Operands may be specified in any of the following ways:
.IP [1]
As an numeric value, either integer or floating-point.
@@ -249,8 +256,12 @@ Computes the length of the hypotenuse of a right-angled triangle
(\fIx\fR*\fIx\fR+\fIy\fR*\fIy\fR).
.TP
\fBint(\fIarg\fB)\fR
-If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise converts
-\fIarg\fR to integer by truncation and returns the converted value.
+.VS 8.4
+If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise
+converts \fIarg\fR to an integer (of the same size as a machine word,
+i.e. 32-bits on 32-bit systems, and 64-bits on 64-bit systems) by
+truncation and returns the converted value.
+.VE 8.4
.TP
\fBlog(\fIarg\fB)\fR
Returns the natural logarithm of \fIarg\fR. \fIArg\fR must be a
@@ -294,6 +305,12 @@ Returns the tangent of \fIarg\fR, measured in radians.
.TP
\fBtanh(\fIarg\fB)\fR
Returns the hyperbolic tangent of \fIarg\fR.
+.TP
+\fBwide(\fIarg\fB)\fR
+.VS 8.4
+Converts \fIarg\fR to a value at least 64-bits wide (by sign-extension
+if \fIarg\fR is a 32-bit number.)
+.VE 8.4
.PP
In addition to these predefined functions, applications may
define additional functions using \fBTcl_CreateMathFunc\fR().