diff options
Diffstat (limited to 'doc/expr.n')
-rw-r--r-- | doc/expr.n | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -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.6 2001/12/03 10:42:47 dkf Exp $ +'\" RCS: @(#) $Id: expr.n,v 1.7 2002/02/15 14:28:47 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. @@ -251,8 +258,12 @@ Computes the length of the hypotenuse of a right-angled triangle \fBsqrt(\fIx\fR*\fIx\fR+\fIy\fR*\fIy\fB)\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 @@ -296,6 +307,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(). |