summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Async.32
-rw-r--r--doc/Backslash.32
-rw-r--r--doc/BoolObj.32
-rw-r--r--doc/Concat.32
-rw-r--r--doc/CrtChannel.32
-rw-r--r--doc/CrtCommand.32
-rw-r--r--doc/CrtFileHdlr.32
-rw-r--r--doc/CrtMathFnc.330
-rw-r--r--doc/CrtObjCmd.32
-rw-r--r--doc/CrtSlave.32
-rw-r--r--doc/DString.32
-rw-r--r--doc/Ensemble.32
-rw-r--r--doc/Environment.32
-rw-r--r--doc/Eval.32
-rw-r--r--doc/ExprLong.32
-rw-r--r--doc/ExprLongObj.32
-rw-r--r--doc/FileSystem.32
-rw-r--r--doc/GetIndex.32
-rw-r--r--doc/GetInt.32
-rw-r--r--doc/GetOpnFl.32
-rw-r--r--doc/IntObj.32
-rw-r--r--doc/Interp.32
-rw-r--r--doc/LinkVar.32
-rw-r--r--doc/ListObj.32
-rw-r--r--doc/Notifier.32
-rw-r--r--doc/Object.32
-rw-r--r--doc/OpenFileChnl.32
-rw-r--r--doc/OpenTcp.32
-rw-r--r--doc/ParseCmd.32
-rw-r--r--doc/PrintDbl.311
-rw-r--r--doc/RegExp.32
-rw-r--r--doc/SaveResult.32
-rw-r--r--doc/SetResult.32
-rw-r--r--doc/StrMatch.32
-rw-r--r--doc/StringObj.32
-rw-r--r--doc/Thread.32
-rw-r--r--doc/TraceVar.32
-rw-r--r--doc/Utf.32
-rw-r--r--doc/array.n2
-rw-r--r--doc/binary.n2
-rw-r--r--doc/close.n2
-rw-r--r--doc/error.n2
-rw-r--r--doc/expr.n159
-rw-r--r--doc/fblocked.n2
-rw-r--r--doc/fconfigure.n2
-rw-r--r--doc/fcopy.n2
-rw-r--r--doc/file.n2
-rw-r--r--doc/fileevent.n2
-rw-r--r--doc/flush.n2
-rw-r--r--doc/foreach.n2
-rw-r--r--doc/format.n2
-rw-r--r--doc/gets.n2
-rw-r--r--doc/info.n2
-rw-r--r--doc/interp.n2
-rw-r--r--doc/lappend.n2
-rw-r--r--doc/lindex.n2
-rw-r--r--doc/linsert.n2
-rw-r--r--doc/llength.n2
-rw-r--r--doc/load.n2
-rw-r--r--doc/lrange.n2
-rw-r--r--doc/lreplace.n2
-rw-r--r--doc/lsearch.n2
-rwxr-xr-xdoc/lset.n2
-rw-r--r--doc/lsort.n2
-rw-r--r--doc/mathfunc.n221
-rw-r--r--doc/open.n2
-rw-r--r--doc/pkgMkIndex.n2
-rw-r--r--doc/puts.n2
-rw-r--r--doc/re_syntax.n2
-rw-r--r--doc/read.n2
-rw-r--r--doc/regexp.n2
-rw-r--r--doc/registry.n2
-rw-r--r--doc/regsub.n2
-rw-r--r--doc/scan.n2
-rw-r--r--doc/seek.n2
-rw-r--r--doc/string.n2
-rw-r--r--doc/subst.n2
-rw-r--r--doc/tclvars.n17
-rw-r--r--doc/tell.n2
-rw-r--r--doc/unload.n2
-rw-r--r--doc/unset.n2
-rw-r--r--doc/upvar.n2
-rw-r--r--doc/variable.n2
83 files changed, 375 insertions, 219 deletions
diff --git a/doc/Async.3 b/doc/Async.3
index 46ab9eb..4be3aa6 100644
--- a/doc/Async.3
+++ b/doc/Async.3
@@ -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: Async.3,v 1.8 2004/12/09 09:19:50 dkf Exp $
+'\" RCS: @(#) $Id: Async.3,v 1.9 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_AsyncCreate 3 7.0 Tcl "Tcl Library Procedures"
diff --git a/doc/Backslash.3 b/doc/Backslash.3
index 0b1fa21..57b73e9 100644
--- a/doc/Backslash.3
+++ b/doc/Backslash.3
@@ -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: Backslash.3,v 1.6 2005/04/06 20:55:19 dkf Exp $
+'\" RCS: @(#) $Id: Backslash.3,v 1.7 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_Backslash 3 "8.1" Tcl "Tcl Library Procedures"
diff --git a/doc/BoolObj.3 b/doc/BoolObj.3
index f586621..ec6a3c9 100644
--- a/doc/BoolObj.3
+++ b/doc/BoolObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: BoolObj.3,v 1.6 2005/04/22 15:46:51 dgp Exp $
+'\" RCS: @(#) $Id: BoolObj.3,v 1.7 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_BooleanObj 3 8.0 Tcl "Tcl Library Procedures"
diff --git a/doc/Concat.3 b/doc/Concat.3
index ebf59de..d4ba689 100644
--- a/doc/Concat.3
+++ b/doc/Concat.3
@@ -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: Concat.3,v 1.8 2005/04/06 20:55:20 dkf Exp $
+'\" RCS: @(#) $Id: Concat.3,v 1.9 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_Concat 3 7.5 Tcl "Tcl Library Procedures"
diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3
index 1f9f5f1..d4f3a20 100644
--- a/doc/CrtChannel.3
+++ b/doc/CrtChannel.3
@@ -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: CrtChannel.3,v 1.28 2005/04/06 20:55:20 dkf Exp $
+'\" RCS: @(#) $Id: CrtChannel.3,v 1.29 2005/05/10 18:33:54 kennykb Exp $
.so man.macros
.TH Tcl_CreateChannel 3 8.4 Tcl "Tcl Library Procedures"
.BS
diff --git a/doc/CrtCommand.3 b/doc/CrtCommand.3
index fd67638..c4e042a 100644
--- a/doc/CrtCommand.3
+++ b/doc/CrtCommand.3
@@ -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: CrtCommand.3,v 1.11 2005/04/06 20:55:20 dkf Exp $
+'\" RCS: @(#) $Id: CrtCommand.3,v 1.12 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_CreateCommand 3 "" Tcl "Tcl Library Procedures"
diff --git a/doc/CrtFileHdlr.3 b/doc/CrtFileHdlr.3
index 042fb5f..9f504e6 100644
--- a/doc/CrtFileHdlr.3
+++ b/doc/CrtFileHdlr.3
@@ -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: CrtFileHdlr.3,v 1.4 2005/04/06 20:55:20 dkf Exp $
+'\" RCS: @(#) $Id: CrtFileHdlr.3,v 1.5 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_CreateFileHandler 3 8.0 Tcl "Tcl Library Procedures"
diff --git a/doc/CrtMathFnc.3 b/doc/CrtMathFnc.3
index 1337ea8..db5a27e 100644
--- a/doc/CrtMathFnc.3
+++ b/doc/CrtMathFnc.3
@@ -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: CrtMathFnc.3,v 1.12 2005/04/06 20:55:20 dkf Exp $
+'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.13 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_CreateMathFunc 3 8.4 Tcl "Tcl Library Procedures"
@@ -64,11 +64,19 @@ passing to \fITcl_StringMatch\fR), or NULL to not apply any filter.
.PP
Tcl allows a number of mathematical functions to be used in
expressions, such as \fBsin\fR, \fBcos\fR, and \fBhypot\fR.
-\fBTcl_CreateMathFunc\fR allows applications to add additional functions
+These functions are represented by commands in the namespace,
+\fBtcl::mathfunc\fR. The \fBTcl_CreateMathFunc\fR function is
+an obsolete way for applications to add additional functions
to those already provided by Tcl or to replace existing functions.
+It should not be used by new applications, which should create
+math functions using \fBTcl_CreateObjCommand\fR to create a command
+in the \fBtcl::mathfunc\fR namespace.
+.PP
+In the \fBTcl_CreateMathFunc\fR interface,
\fIName\fR is the name of the function as it will appear in expressions.
-If \fIname\fR doesn't already exist as a function then a new function
-is created. If it does exist, then the existing function is replaced.
+If \fIname\fR doesn't already exist in the \fB::tcl::mathfunc\fR
+namespace, then a new command is created in that namespace.
+If \fIname\fR does exist, then the existing function is replaced.
\fINumArgs\fR and \fIargTypes\fR describe the arguments to the function.
Each entry in the \fIargTypes\fR array must be
one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR, \fBTCL_WIDE_INT\fR,
@@ -130,10 +138,14 @@ result.
If an error did not occur, the array reference placed in the variable
pointed to by \fIargTypesPtr\fR is newly allocated, and should be
released by passing it to \fBTcl_Free\fR. Some functions (the
-standard set implemented in the core) are implemented directly at the
-bytecode level; attempting to retrieve values for them causes a NULL
-to be stored in the variable pointed to by \fIprocPtr\fR and the
-variable pointed to by \fIclientDataPtr\fR will not be modified.
+standard set implemented in the core, and those defined by placing
+commands in the \fBtcl::mathfunc\fR namespace) do not have
+argument type information; attempting to retrieve values for
+them causes a NULL to be stored in the variable pointed to by
+\fIprocPtr\fR and the variable pointed to by \fIclientDataPtr\fR
+will not be modified. The variable pointed to by \fInumArgsPointer\fR
+will contain -1, and no argument types will be stored in the variable
+pointed to by \fIargTypesPointer\fR.
.PP
\fBTcl_ListMathFuncs\fR returns a Tcl object containing a list of all
the math functions defined in the interpreter whose name matches
@@ -145,4 +157,4 @@ object will have a reference count of zero.
expression, mathematical function
.SH "SEE ALSO"
-expr(n), info(n), Tcl_Free(3), Tcl_NewListObj(3)
+expr(n), info(n), Tcl_CreateObjCommand(3), Tcl_Free(3), Tcl_NewListObj(3)
diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3
index 14ba0a5..490ca94 100644
--- a/doc/CrtObjCmd.3
+++ b/doc/CrtObjCmd.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.12 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.13 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures"
diff --git a/doc/CrtSlave.3 b/doc/CrtSlave.3
index b201a7a..1ee41b0 100644
--- a/doc/CrtSlave.3
+++ b/doc/CrtSlave.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: CrtSlave.3,v 1.15 2005/03/01 22:51:55 davidw Exp $
+'\" RCS: @(#) $Id: CrtSlave.3,v 1.16 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_CreateSlave 3 7.6 Tcl "Tcl Library Procedures"
diff --git a/doc/DString.3 b/doc/DString.3
index 5caa3ee..8c44bb2 100644
--- a/doc/DString.3
+++ b/doc/DString.3
@@ -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: DString.3,v 1.12 2005/05/03 18:07:41 dgp Exp $
+'\" RCS: @(#) $Id: DString.3,v 1.13 2005/05/10 18:33:54 kennykb Exp $
'\"
.so man.macros
.TH Tcl_DString 3 7.4 Tcl "Tcl Library Procedures"
diff --git a/doc/Ensemble.3 b/doc/Ensemble.3
index fad3851..b98c36c 100644
--- a/doc/Ensemble.3
+++ b/doc/Ensemble.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Ensemble.3,v 1.1 2005/01/19 23:15:26 dkf Exp $
+'\" RCS: @(#) $Id: Ensemble.3,v 1.2 2005/05/10 18:33:55 kennykb Exp $
'\"
'\" This documents the C API introduced in TIP#235
'\"
diff --git a/doc/Environment.3 b/doc/Environment.3
index e11f32d..16efd84 100644
--- a/doc/Environment.3
+++ b/doc/Environment.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Environment.3,v 1.5 2005/05/03 18:07:42 dgp Exp $
+'\" RCS: @(#) $Id: Environment.3,v 1.6 2005/05/10 18:33:55 kennykb Exp $
'\"
.so man.macros
.TH Tcl_PutEnv 3 "7.5" Tcl "Tcl Library Procedures"
diff --git a/doc/Eval.3 b/doc/Eval.3
index f83b9da..24b1648 100644
--- a/doc/Eval.3
+++ b/doc/Eval.3
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Eval.3,v 1.20 2005/05/03 18:07:42 dgp Exp $
+'\" RCS: @(#) $Id: Eval.3,v 1.21 2005/05/10 18:33:55 kennykb Exp $
'\"
.so man.macros
.TH Tcl_Eval 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/ExprLong.3 b/doc/ExprLong.3
index 9199dd7..0600330 100644
--- a/doc/ExprLong.3
+++ b/doc/ExprLong.3
@@ -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: ExprLong.3,v 1.10 2005/05/03 18:07:42 dgp Exp $
+'\" RCS: @(#) $Id: ExprLong.3,v 1.11 2005/05/10 18:33:55 kennykb Exp $
'\"
.so man.macros
.TH Tcl_ExprLong 3 7.0 Tcl "Tcl Library Procedures"
diff --git a/doc/ExprLongObj.3 b/doc/ExprLongObj.3
index b7a2caa..82aabe7 100644
--- a/doc/ExprLongObj.3
+++ b/doc/ExprLongObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ExprLongObj.3,v 1.4 2005/05/03 18:07:42 dgp Exp $
+'\" RCS: @(#) $Id: ExprLongObj.3,v 1.5 2005/05/10 18:33:55 kennykb Exp $
'\"
.so man.macros
.TH Tcl_ExprLongObj 3 8.0 Tcl "Tcl Library Procedures"
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index 8456331..cdac36e 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: FileSystem.3,v 1.53 2005/03/30 13:25:54 dkf Exp $
+'\" RCS: @(#) $Id: FileSystem.3,v 1.54 2005/05/10 18:33:55 kennykb Exp $
'\"
.so man.macros
.TH Filesystem 3 8.4 Tcl "Tcl Library Procedures"
diff --git a/doc/GetIndex.3 b/doc/GetIndex.3
index 7428549..f476ea5 100644
--- a/doc/GetIndex.3
+++ b/doc/GetIndex.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: GetIndex.3,v 1.17 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: GetIndex.3,v 1.18 2005/05/10 18:33:56 kennykb Exp $
'\"
.so man.macros
.TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/GetInt.3 b/doc/GetInt.3
index e33eac6..83cd2d6 100644
--- a/doc/GetInt.3
+++ b/doc/GetInt.3
@@ -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: GetInt.3,v 1.9 2005/05/03 18:07:42 dgp Exp $
+'\" RCS: @(#) $Id: GetInt.3,v 1.10 2005/05/10 18:33:56 kennykb Exp $
'\"
.so man.macros
.TH Tcl_GetInt 3 "" Tcl "Tcl Library Procedures"
diff --git a/doc/GetOpnFl.3 b/doc/GetOpnFl.3
index 5982460..7524aeb 100644
--- a/doc/GetOpnFl.3
+++ b/doc/GetOpnFl.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: GetOpnFl.3,v 1.10 2005/05/03 18:07:42 dgp Exp $
+'\" RCS: @(#) $Id: GetOpnFl.3,v 1.11 2005/05/10 18:33:56 kennykb Exp $
.so man.macros
.TH Tcl_GetOpenFile 3 8.0 Tcl "Tcl Library Procedures"
.BS
diff --git a/doc/IntObj.3 b/doc/IntObj.3
index 966a8ed..3bdac48 100644
--- a/doc/IntObj.3
+++ b/doc/IntObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: IntObj.3,v 1.7 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: IntObj.3,v 1.8 2005/05/10 18:33:56 kennykb Exp $
'\"
.so man.macros
.TH Tcl_IntObj 3 8.0 Tcl "Tcl Library Procedures"
diff --git a/doc/Interp.3 b/doc/Interp.3
index 108c654..c61ae40 100644
--- a/doc/Interp.3
+++ b/doc/Interp.3
@@ -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: Interp.3,v 1.8 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: Interp.3,v 1.9 2005/05/10 18:33:56 kennykb Exp $
'\"
.so man.macros
.TH Tcl_Interp 3 7.5 Tcl "Tcl Library Procedures"
diff --git a/doc/LinkVar.3 b/doc/LinkVar.3
index c1ee6ab..5d8a2e3 100644
--- a/doc/LinkVar.3
+++ b/doc/LinkVar.3
@@ -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: LinkVar.3,v 1.10 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: LinkVar.3,v 1.11 2005/05/10 18:33:56 kennykb Exp $
'\"
.so man.macros
.TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures"
diff --git a/doc/ListObj.3 b/doc/ListObj.3
index 8ec698f..a17ab66 100644
--- a/doc/ListObj.3
+++ b/doc/ListObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ListObj.3,v 1.9 2005/04/02 02:08:29 msofer Exp $
+'\" RCS: @(#) $Id: ListObj.3,v 1.10 2005/05/10 18:33:56 kennykb Exp $
'\"
.so man.macros
.TH Tcl_ListObj 3 8.0 Tcl "Tcl Library Procedures"
diff --git a/doc/Notifier.3 b/doc/Notifier.3
index c57a189..7776610 100644
--- a/doc/Notifier.3
+++ b/doc/Notifier.3
@@ -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: Notifier.3,v 1.14 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: Notifier.3,v 1.15 2005/05/10 18:33:56 kennykb Exp $
'\"
.so man.macros
.TH Notifier 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/Object.3 b/doc/Object.3
index bfcc5c0..8f8c9ef 100644
--- a/doc/Object.3
+++ b/doc/Object.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Object.3,v 1.11 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: Object.3,v 1.12 2005/05/10 18:33:56 kennykb Exp $
'\"
.so man.macros
.TH Tcl_Obj 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index 9f0f8d8..73494ce 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.30 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.31 2005/05/10 18:33:56 kennykb Exp $
.so man.macros
.TH Tcl_OpenFileChannel 3 8.3 Tcl "Tcl Library Procedures"
.BS
diff --git a/doc/OpenTcp.3 b/doc/OpenTcp.3
index a3aa360..f5b733d 100644
--- a/doc/OpenTcp.3
+++ b/doc/OpenTcp.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: OpenTcp.3,v 1.9 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: OpenTcp.3,v 1.10 2005/05/10 18:33:57 kennykb Exp $
.so man.macros
.TH Tcl_OpenTcpClient 3 8.0 Tcl "Tcl Library Procedures"
.BS
diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3
index 9265cae..783ffb1 100644
--- a/doc/ParseCmd.3
+++ b/doc/ParseCmd.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ParseCmd.3,v 1.20 2005/05/03 18:07:43 dgp Exp $
+'\" RCS: @(#) $Id: ParseCmd.3,v 1.21 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Tcl_ParseCommand 3 8.3 Tcl "Tcl Library Procedures"
diff --git a/doc/PrintDbl.3 b/doc/PrintDbl.3
index 9261451..4588126 100644
--- a/doc/PrintDbl.3
+++ b/doc/PrintDbl.3
@@ -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: PrintDbl.3,v 1.6 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: PrintDbl.3,v 1.7 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Tcl_PrintDouble 3 8.0 Tcl "Tcl Library Procedures"
@@ -40,6 +40,15 @@ special twist: the string is guaranteed to contain either
a ``.'' or an ``e'' so that it doesn't look like an integer. Where
\fB%g\fR would generate an integer with no decimal point, \fBTcl_PrintDouble\fR
adds ``.0''.
+.VS 8.5
+.PP
+If the \fBtcl_precision\fR value is non-zero, the result will have
+precisely that many digits of significance. If the value is zero
+(the default), the result will have the fewest digits needed to
+represent the number in such a way that \fBTcl_NewDoubleObj\fR
+will generate the same number when presented with the given string.
+IEEE semantics of rounding to even apply to the conversion.
+.VE
.SH KEYWORDS
conversion, double-precision, floating-point, string
diff --git a/doc/RegExp.3 b/doc/RegExp.3
index ce4c7d9..48cbd65 100644
--- a/doc/RegExp.3
+++ b/doc/RegExp.3
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: RegExp.3,v 1.22 2005/05/03 18:07:43 dgp Exp $
+'\" RCS: @(#) $Id: RegExp.3,v 1.23 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Tcl_RegExpMatch 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/SaveResult.3 b/doc/SaveResult.3
index c397152..a8af63e 100644
--- a/doc/SaveResult.3
+++ b/doc/SaveResult.3
@@ -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: SaveResult.3,v 1.6 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: SaveResult.3,v 1.7 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Tcl_SaveResult 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/SetResult.3 b/doc/SetResult.3
index 70812d0..ad1261c 100644
--- a/doc/SetResult.3
+++ b/doc/SetResult.3
@@ -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: SetResult.3,v 1.12 2005/05/03 18:07:43 dgp Exp $
+'\" RCS: @(#) $Id: SetResult.3,v 1.13 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures"
diff --git a/doc/StrMatch.3 b/doc/StrMatch.3
index 75fa308..e09a2d6 100644
--- a/doc/StrMatch.3
+++ b/doc/StrMatch.3
@@ -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: StrMatch.3,v 1.8 2005/05/03 18:07:44 dgp Exp $
+'\" RCS: @(#) $Id: StrMatch.3,v 1.9 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Tcl_StringMatch 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index 002a1e5..c16e9cc 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: StringObj.3,v 1.18 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: StringObj.3,v 1.19 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures"
diff --git a/doc/Thread.3 b/doc/Thread.3
index de0b0e3..7a236b8 100644
--- a/doc/Thread.3
+++ b/doc/Thread.3
@@ -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: Thread.3,v 1.23 2005/02/06 22:14:26 davidw Exp $
+'\" RCS: @(#) $Id: Thread.3,v 1.24 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Threads 3 "8.1" Tcl "Tcl Library Procedures"
diff --git a/doc/TraceVar.3 b/doc/TraceVar.3
index 19fad3b..a659f03 100644
--- a/doc/TraceVar.3
+++ b/doc/TraceVar.3
@@ -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: TraceVar.3,v 1.14 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: TraceVar.3,v 1.15 2005/05/10 18:33:57 kennykb Exp $
'\"
.so man.macros
.TH Tcl_TraceVar 3 7.4 Tcl "Tcl Library Procedures"
diff --git a/doc/Utf.3 b/doc/Utf.3
index 512ec96..b1f29ca 100644
--- a/doc/Utf.3
+++ b/doc/Utf.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Utf.3,v 1.22 2005/05/03 18:07:44 dgp Exp $
+'\" RCS: @(#) $Id: Utf.3,v 1.23 2005/05/10 18:33:58 kennykb Exp $
'\"
.so man.macros
.TH Utf 3 "8.1" Tcl "Tcl Library Procedures"
diff --git a/doc/array.n b/doc/array.n
index c7cc26b..1a39b7b 100644
--- a/doc/array.n
+++ b/doc/array.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: array.n,v 1.14 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: array.n,v 1.15 2005/05/10 18:33:59 kennykb Exp $
'\"
.so man.macros
.TH array n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/binary.n b/doc/binary.n
index ab98224..f2b7155 100644
--- a/doc/binary.n
+++ b/doc/binary.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: binary.n,v 1.25 2005/02/10 09:33:01 dkf Exp $
+'\" RCS: @(#) $Id: binary.n,v 1.26 2005/05/10 18:33:59 kennykb Exp $
'\"
.so man.macros
.TH binary n 8.0 Tcl "Tcl Built-In Commands"
diff --git a/doc/close.n b/doc/close.n
index 0263e47..23aae91 100644
--- a/doc/close.n
+++ b/doc/close.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: close.n,v 1.9 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: close.n,v 1.10 2005/05/10 18:33:59 kennykb Exp $
'\"
.so man.macros
.TH close n 7.5 Tcl "Tcl Built-In Commands"
diff --git a/doc/error.n b/doc/error.n
index 2a4fdba..20bdbfe 100644
--- a/doc/error.n
+++ b/doc/error.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: error.n,v 1.8 2004/12/07 00:00:57 hobbs Exp $
+'\" RCS: @(#) $Id: error.n,v 1.9 2005/05/10 18:33:59 kennykb Exp $
'\"
.so man.macros
.TH error n "" Tcl "Tcl Built-In Commands"
diff --git a/doc/expr.n b/doc/expr.n
index 6779c93..55184b3 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -1,11 +1,12 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
'\" Copyright (c) 1994-2000 Sun Microsystems, Inc.
+.\" Copyright (c) 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved
'\"
'\" 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.18 2004/10/27 09:36:58 dkf Exp $
+'\" RCS: @(#) $Id: expr.n,v 1.19 2005/05/10 18:33:59 kennykb Exp $
'\"
.so man.macros
.TH expr n 8.5 Tcl "Tcl Built-In Commands"
@@ -84,8 +85,8 @@ The command will be executed and its result will be used as
the operand.
.IP [7]
As a mathematical function whose arguments have any of the above
-forms for operands, such as \fBsin($x)\fR. See below for a list of defined
-functions.
+forms for operands, such as \fBsin($x)\fR. See MATH FUNCTIONS below for
+a discussion of how mathematical functions are handled.
.LP
Where the above substitutions occur (e.g. inside quoted strings), they
are performed by the expression's instructions.
@@ -211,131 +212,24 @@ the Tcl parser will evaluate both \fB[a]\fR and \fB[b]\fR before
invoking the \fBexpr\fR command.
.SS "MATH FUNCTIONS"
.PP
-Tcl supports the following mathematical functions in expressions, all
-of which work solely with floating-point numbers unless otherwise noted:
-.DS
-.ta 3c 6c 9c
-\fBabs\fR \fBcosh\fR \fBlog\fR \fBsqrt\fR
-\fBacos\fR \fBdouble\fR \fBlog10\fR \fBsrand\fR
-\fBasin\fR \fBexp\fR \fBpow\fR \fBtan\fR
-\fBatan\fR \fBfloor\fR \fBrand\fR \fBtanh\fR
-\fBatan2\fR \fBfmod\fR \fBround\fR \fBwide\fR
-\fBceil\fR \fBhypot\fR \fBsin\fR
-\fBcos\fR \fBint\fR \fBsinh\fR
-.DE
-.PP
-.TP
-\fBabs(\fIarg\fB)\fR
-Returns the absolute value of \fIarg\fR. \fIArg\fR may be either
-integer or floating-point, and the result is returned in the same form.
-.TP
-\fBacos(\fIarg\fB)\fR
-Returns the arc cosine of \fIarg\fR, in the range [\fI0\fR,\fIpi\fR]
-radians. \fIArg\fR should be in the range [\fI-1\fR,\fI1\fR].
-.TP
-\fBasin(\fIarg\fB)\fR
-Returns the arc sine of \fIarg\fR, in the range [\fI-pi/2\fR,\fIpi/2\fR]
-radians. \fIArg\fR should be in the range [\fI-1\fR,\fI1\fR].
-.TP
-\fBatan(\fIarg\fB)\fR
-Returns the arc tangent of \fIarg\fR, in the range [\fI-pi/2\fR,\fIpi/2\fR]
-radians.
-.TP
-\fBatan2(\fIy, x\fB)\fR
-Returns the arc tangent of \fIy\fR/\fIx\fR, in the range [\fI-pi\fR,\fIpi\fR]
-radians. \fIx\fR and \fIy\fR cannot both be 0. If \fIx\fR is greater
-than \fI0\fR, this is equivalent to \fBatan(\fIy/x\fB)\fR.
-.TP
-\fBceil(\fIarg\fB)\fR
-Returns the smallest integral floating-point value (i.e. with a zero
-fractional part) not less than \fIarg\fR.
-.TP
-\fBcos(\fIarg\fB)\fR
-Returns the cosine of \fIarg\fR, measured in radians.
-.TP
-\fBcosh(\fIarg\fB)\fR
-Returns the hyperbolic cosine of \fIarg\fR. If the result would cause
-an overflow, an error is returned.
-.TP
-\fBdouble(\fIarg\fB)\fR
-If \fIarg\fR is a floating-point value, returns \fIarg\fR, otherwise converts
-\fIarg\fR to floating-point and returns the converted value.
-.TP
-\fBexp(\fIarg\fB)\fR
-Returns the exponential of \fIarg\fR, defined as \fIe\fR**\fIarg\fR.
-If the result would cause an overflow, an error is returned.
-.TP
-\fBfloor(\fIarg\fB)\fR
-Returns the largest integral floating-point value (i.e. with a zero
-fractional part) not greater than \fIarg\fR.
-.TP
-\fBfmod(\fIx, y\fB)\fR
-Returns the floating-point remainder of the division of \fIx\fR by
-\fIy\fR. If \fIy\fR is 0, an error is returned.
-.TP
-\fBhypot(\fIx, y\fB)\fR
-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 of the same width as the machine
-word, 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.
-.TP
-\fBlog(\fIarg\fB)\fR
-Returns the natural logarithm of \fIarg\fR. \fIArg\fR must be a
-positive value.
-.TP
-\fBlog10(\fIarg\fB)\fR
-Returns the base 10 logarithm of \fIarg\fR. \fIArg\fR must be a
-positive value.
-.TP
-\fBpow(\fIx, y\fB)\fR
-Computes the value of \fIx\fR raised to the power \fIy\fR. If \fIx\fR
-is negative, \fIy\fR must be an integer value.
-.TP
-\fBrand()\fR
-Returns a pseudo-random floating-point value in the range (\fI0\fR,\fI1\fR).
-The generator algorithm is a simple linear congruential generator that
-is not cryptographically secure. Each result from \fBrand\fR completely
-determines all future results from subsequent calls to \fBrand\fR, so
-\fBrand\fR should not be used to generate a sequence of secrets, such as
-one-time passwords. The seed of the generator is initialized from the
-internal clock of the machine or may be set with the \fBsrand\fR function.
-.TP
-\fBround(\fIarg\fB)\fR
-If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise converts
-\fIarg\fR to integer by rounding and returns the converted value.
-.TP
-\fBsin(\fIarg\fB)\fR
-Returns the sine of \fIarg\fR, measured in radians.
-.TP
-\fBsinh(\fIarg\fB)\fR
-Returns the hyperbolic sine of \fIarg\fR. If the result would cause
-an overflow, an error is returned.
-.TP
-\fBsqrt(\fIarg\fB)\fR
-Returns the square root of \fIarg\fR. \fIArg\fR must be non-negative.
-.TP
-\fBsrand(\fIarg\fB)\fR
-The \fIarg\fR, which must be an integer, is used to reset the seed for
-the random number generator of \fBrand\fR. Returns the first random
-number (see \fBrand()\fR) from that seed. Each interpreter has its own seed.
-.TP
-\fBtan(\fIarg\fB)\fR
-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
-Converts \fIarg\fR to an integer value at least 64-bits wide (by sign-extension
-if \fIarg\fR is a 32-bit number) if it is not one already.
+When the expression parser encounters a mathematical function
+such as \fBsin($x)\fR, it replaces it with a call to an ordinary
+Tcl function in the \fBtcl::mathfunc\fR namespace. The processing
+of an expression such as:
+.CS
+\fBexpr {sin($x+$y)}\fR
+.CE
+is the same in every way as the processing of:
+.CS
+\fBexpr {[tcl::mathfunc::sin [expr {$x+$y}]]}
+.CE
+The executor will search for \fBtcl::mathfunc::sin\fR using the
+usual rules for resolving functions in namespaces. Either
+\fB::tcl::mathfunc::sin\fR or \fB[namespace current]::tcl::mathfunc::sin\fR
+will satisfy the request.
.PP
-In addition to these predefined functions, applications may
-define additional functions using \fBTcl_CreateMathFunc\fR().
+See the \fBmathfunc(n)\fR manual page for the math functions that are
+available by default.
.SS "TYPES, OVERFLOW, AND PRECISION"
.PP
All internal computations involving integers are done with the C type
@@ -430,7 +324,7 @@ each time the expression is executed.
Define a procedure that computes an "interesting" mathematical
function:
.CS
-proc calc {x y} {
+proc tcl::mathfunc::calc {x y} {
\fBexpr\fR { ($x**2 - $y**2) / exp($x**2 + $y**2) }
}
.CE
@@ -470,7 +364,14 @@ set randNum [\fBexpr\fR { int(100 * rand()) }]
.CE
.SH "SEE ALSO"
-array(n), for(n), if(n), string(n), Tcl(n), while(n)
+array(n), for(n), if(n), mathfunc(n), namespace(n), proc(n), string(n), Tcl(n), while(n)
.SH KEYWORDS
arithmetic, boolean, compare, expression, fuzzy comparison
+
+.SH COPYRIGHT
+Copyright (c) 1993 The Regents of the University of California.
+.br
+Copyright (c) 1994-2000 Sun Microsystems Incorporated.
+.br
+Copyright (c) 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved.
diff --git a/doc/fblocked.n b/doc/fblocked.n
index 16d9913..5b5efac 100644
--- a/doc/fblocked.n
+++ b/doc/fblocked.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: fblocked.n,v 1.7 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: fblocked.n,v 1.8 2005/05/10 18:33:59 kennykb Exp $
.so man.macros
.TH fblocked n 7.5 Tcl "Tcl Built-In Commands"
.BS
diff --git a/doc/fconfigure.n b/doc/fconfigure.n
index a550c0e..10e5fb1 100644
--- a/doc/fconfigure.n
+++ b/doc/fconfigure.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: fconfigure.n,v 1.12 2005/04/13 10:53:44 dkf Exp $
+'\" RCS: @(#) $Id: fconfigure.n,v 1.13 2005/05/10 18:33:59 kennykb Exp $
'\"
.so man.macros
.TH fconfigure n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/fcopy.n b/doc/fcopy.n
index a97950b..de74d3c 100644
--- a/doc/fcopy.n
+++ b/doc/fcopy.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: fcopy.n,v 1.5 2005/04/13 11:06:27 dkf Exp $
+'\" RCS: @(#) $Id: fcopy.n,v 1.6 2005/05/10 18:33:59 kennykb Exp $
'\"
.so man.macros
.TH fcopy n 8.0 Tcl "Tcl Built-In Commands"
diff --git a/doc/file.n b/doc/file.n
index e0a18df..c3c975a 100644
--- a/doc/file.n
+++ b/doc/file.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: file.n,v 1.39 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: file.n,v 1.40 2005/05/10 18:33:59 kennykb Exp $
'\"
.so man.macros
.TH file n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/fileevent.n b/doc/fileevent.n
index 4245219..62ce6b4 100644
--- a/doc/fileevent.n
+++ b/doc/fileevent.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: fileevent.n,v 1.8 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: fileevent.n,v 1.9 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH fileevent n 7.5 Tcl "Tcl Built-In Commands"
diff --git a/doc/flush.n b/doc/flush.n
index e72db21..8ee4870 100644
--- a/doc/flush.n
+++ b/doc/flush.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: flush.n,v 1.7 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: flush.n,v 1.8 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH flush n 7.5 Tcl "Tcl Built-In Commands"
diff --git a/doc/foreach.n b/doc/foreach.n
index 62a46d1..3398b17 100644
--- a/doc/foreach.n
+++ b/doc/foreach.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: foreach.n,v 1.6 2004/12/07 20:47:16 dkf Exp $
+'\" RCS: @(#) $Id: foreach.n,v 1.7 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH foreach n "" Tcl "Tcl Built-In Commands"
diff --git a/doc/format.n b/doc/format.n
index 4bdb5c6..846e832 100644
--- a/doc/format.n
+++ b/doc/format.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: format.n,v 1.11 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: format.n,v 1.12 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH format n 8.1 Tcl "Tcl Built-In Commands"
diff --git a/doc/gets.n b/doc/gets.n
index 2f33e12..5c3a908 100644
--- a/doc/gets.n
+++ b/doc/gets.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: gets.n,v 1.7 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: gets.n,v 1.8 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH gets n 7.5 Tcl "Tcl Built-In Commands"
diff --git a/doc/info.n b/doc/info.n
index cfaf1c0..1fc9f8b 100644
--- a/doc/info.n
+++ b/doc/info.n
@@ -7,7 +7,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: info.n,v 1.15 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: info.n,v 1.16 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH info n 8.4 Tcl "Tcl Built-In Commands"
diff --git a/doc/interp.n b/doc/interp.n
index 7f69948..c426bfc 100644
--- a/doc/interp.n
+++ b/doc/interp.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: interp.n,v 1.23 2005/04/06 20:55:23 dkf Exp $
+'\" RCS: @(#) $Id: interp.n,v 1.24 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH interp n 7.6 Tcl "Tcl Built-In Commands"
diff --git a/doc/lappend.n b/doc/lappend.n
index 4a5da12..38c52e5 100644
--- a/doc/lappend.n
+++ b/doc/lappend.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lappend.n,v 1.10 2005/04/06 20:55:23 dkf Exp $
+'\" RCS: @(#) $Id: lappend.n,v 1.11 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH lappend n "" Tcl "Tcl Built-In Commands"
diff --git a/doc/lindex.n b/doc/lindex.n
index d3b85b2..10981c1 100644
--- a/doc/lindex.n
+++ b/doc/lindex.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lindex.n,v 1.10 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: lindex.n,v 1.11 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH lindex n 8.4 Tcl "Tcl Built-In Commands"
diff --git a/doc/linsert.n b/doc/linsert.n
index d563650..d6384d2 100644
--- a/doc/linsert.n
+++ b/doc/linsert.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: linsert.n,v 1.12 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: linsert.n,v 1.13 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH linsert n 8.2 Tcl "Tcl Built-In Commands"
diff --git a/doc/llength.n b/doc/llength.n
index d485073..201d50e 100644
--- a/doc/llength.n
+++ b/doc/llength.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: llength.n,v 1.9 2005/04/06 20:55:23 dkf Exp $
+'\" RCS: @(#) $Id: llength.n,v 1.10 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH llength n "" Tcl "Tcl Built-In Commands"
diff --git a/doc/load.n b/doc/load.n
index e082d1e..9e5eeeb 100644
--- a/doc/load.n
+++ b/doc/load.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: load.n,v 1.13 2005/04/06 20:55:23 dkf Exp $
+'\" RCS: @(#) $Id: load.n,v 1.14 2005/05/10 18:34:00 kennykb Exp $
'\"
.so man.macros
.TH load n 7.5 Tcl "Tcl Built-In Commands"
diff --git a/doc/lrange.n b/doc/lrange.n
index 974947a..cb01071 100644
--- a/doc/lrange.n
+++ b/doc/lrange.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lrange.n,v 1.11 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: lrange.n,v 1.12 2005/05/10 18:34:01 kennykb Exp $
'\"
.so man.macros
.TH lrange n 7.4 Tcl "Tcl Built-In Commands"
diff --git a/doc/lreplace.n b/doc/lreplace.n
index f9f12e2..4c9f8c9 100644
--- a/doc/lreplace.n
+++ b/doc/lreplace.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lreplace.n,v 1.12 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: lreplace.n,v 1.13 2005/05/10 18:34:01 kennykb Exp $
'\"
.so man.macros
.TH lreplace n 7.4 Tcl "Tcl Built-In Commands"
diff --git a/doc/lsearch.n b/doc/lsearch.n
index ffac227..823be5e 100644
--- a/doc/lsearch.n
+++ b/doc/lsearch.n
@@ -7,7 +7,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lsearch.n,v 1.23 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: lsearch.n,v 1.24 2005/05/10 18:34:01 kennykb Exp $
'\"
.so man.macros
.TH lsearch n 8.5 Tcl "Tcl Built-In Commands"
diff --git a/doc/lset.n b/doc/lset.n
index 5f6e2d5..969aba9 100755
--- a/doc/lset.n
+++ b/doc/lset.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lset.n,v 1.8 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: lset.n,v 1.9 2005/05/10 18:34:02 kennykb Exp $
'\"
.so man.macros
.TH lset n 8.4 Tcl "Tcl Built-In Commands"
diff --git a/doc/lsort.n b/doc/lsort.n
index f1b29d4..a921745 100644
--- a/doc/lsort.n
+++ b/doc/lsort.n
@@ -7,7 +7,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: lsort.n,v 1.19 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: lsort.n,v 1.20 2005/05/10 18:34:02 kennykb Exp $
'\"
.so man.macros
.TH lsort n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/mathfunc.n b/doc/mathfunc.n
new file mode 100644
index 0000000..dfa4cb6
--- /dev/null
+++ b/doc/mathfunc.n
@@ -0,0 +1,221 @@
+.\"
+'\" Copyright (c) 1993 The Regents of the University of California.
+'\" Copyright (c) 1994-2000 Sun Microsystems, Inc.
+'\" Copyright (c) 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: @(#) $Id: mathfunc.n,v 1.2 2005/05/10 18:34:02 kennykb Exp $
+'\"
+.so man.macros
+.TH mathfunc n 8.5 Tcl "Tcl Mathematical Functions"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+expr \- Evaluate an expression
+.SH SYNOPSIS
+package require \fBTcl 8.5\fR
+.sp
+\fB::tcl::mathfunc::abs\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::acos\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::asin\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::atan\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::atan2\fR \fIy\fR \fIx\fR
+.br
+\fB::tcl::mathfunc::ceil\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::cos\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::cosh\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::double\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::exp\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::floor\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::fmod\fR \fIx\fR \fIy\fR
+.br
+\fB::tcl::mathfunc::hypot\fR \fIx\fR \fIy\fR
+.br
+\fB::tcl::mathfunc::int\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::log\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::log10\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::pow\fR \fIx\fR \fIy\fR
+.br
+\fB::tcl::mathfunc::rand\fR
+.br
+\fB::tcl::mathfunc::round\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::sin\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::sinh\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::sqrt\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::srand\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::tan\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::tanh\fR \fIarg\fR
+.br
+\fB::tcl::mathfunc::wide\fR \fIarg\fR
+.sp
+.BE
+.SH "DESCRIPTION"
+.PP
+The \fBexpr\fR command handles mathematical functions of the form
+\fBsin($x)\fR or \fBatan2($y,$x)\fR by converting them to calls of the
+form \fB[tcl::math::sin [expr {$x}]]\fR or
+\fB[tcl::math::atan2 [expr {$y}] [expr {$x}]]\fR.
+A number of math functions are available by default within the
+namespace \fB::tcl::mathfunc\fR; these functions are also available
+for code apart from \fBexpr\fR, by invoking the given commands
+directly.
+.PP
+Tcl supports the following mathematical functions in expressions, all
+of which work solely with floating-point numbers unless otherwise noted:
+.DS
+.ta 3c 6c 9c
+\fBabs\fR \fBcosh\fR \fBlog\fR \fBsqrt\fR
+\fBacos\fR \fBdouble\fR \fBlog10\fR \fBsrand\fR
+\fBasin\fR \fBexp\fR \fBpow\fR \fBtan\fR
+\fBatan\fR \fBfloor\fR \fBrand\fR \fBtanh\fR
+\fBatan2\fR \fBfmod\fR \fBround\fR \fBwide\fR
+\fBceil\fR \fBhypot\fR \fBsin\fR
+\fBcos\fR \fBint\fR \fBsinh\fR
+.DE
+.PP
+.TP
+\fBabs(\fIarg\fB)\fR
+Returns the absolute value of \fIarg\fR. \fIArg\fR may be either
+integer or floating-point, and the result is returned in the same form.
+.TP
+\fBacos(\fIarg\fB)\fR
+Returns the arc cosine of \fIarg\fR, in the range [\fI0\fR,\fIpi\fR]
+radians. \fIArg\fR should be in the range [\fI-1\fR,\fI1\fR].
+.TP
+\fBasin(\fIarg\fB)\fR
+Returns the arc sine of \fIarg\fR, in the range [\fI-pi/2\fR,\fIpi/2\fR]
+radians. \fIArg\fR should be in the range [\fI-1\fR,\fI1\fR].
+.TP
+\fBatan(\fIarg\fB)\fR
+Returns the arc tangent of \fIarg\fR, in the range [\fI-pi/2\fR,\fIpi/2\fR]
+radians.
+.TP
+\fBatan2(\fIy, x\fB)\fR
+Returns the arc tangent of \fIy\fR/\fIx\fR, in the range [\fI-pi\fR,\fIpi\fR]
+radians. \fIx\fR and \fIy\fR cannot both be 0. If \fIx\fR is greater
+than \fI0\fR, this is equivalent to \fBatan(\fIy/x\fB)\fR.
+.TP
+\fBceil(\fIarg\fB)\fR
+Returns the smallest integral floating-point value (i.e. with a zero
+fractional part) not less than \fIarg\fR.
+.TP
+\fBcos(\fIarg\fB)\fR
+Returns the cosine of \fIarg\fR, measured in radians.
+.TP
+\fBcosh(\fIarg\fB)\fR
+Returns the hyperbolic cosine of \fIarg\fR. If the result would cause
+an overflow, an error is returned.
+.TP
+\fBdouble(\fIarg\fB)\fR
+If \fIarg\fR is a floating-point value, returns \fIarg\fR, otherwise converts
+\fIarg\fR to floating-point and returns the converted value.
+.TP
+\fBexp(\fIarg\fB)\fR
+Returns the exponential of \fIarg\fR, defined as \fIe\fR**\fIarg\fR.
+If the result would cause an overflow, an error is returned.
+.TP
+\fBfloor(\fIarg\fB)\fR
+Returns the largest integral floating-point value (i.e. with a zero
+fractional part) not greater than \fIarg\fR.
+.TP
+\fBfmod(\fIx, y\fB)\fR
+Returns the floating-point remainder of the division of \fIx\fR by
+\fIy\fR. If \fIy\fR is 0, an error is returned.
+.TP
+\fBhypot(\fIx, y\fB)\fR
+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 of the same width as the machine
+word, 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.
+.TP
+\fBlog(\fIarg\fB)\fR
+Returns the natural logarithm of \fIarg\fR. \fIArg\fR must be a
+positive value.
+.TP
+\fBlog10(\fIarg\fB)\fR
+Returns the base 10 logarithm of \fIarg\fR. \fIArg\fR must be a
+positive value.
+.TP
+\fBpow(\fIx, y\fB)\fR
+Computes the value of \fIx\fR raised to the power \fIy\fR. If \fIx\fR
+is negative, \fIy\fR must be an integer value.
+.TP
+\fBrand()\fR
+Returns a pseudo-random floating-point value in the range (\fI0\fR,\fI1\fR).
+The generator algorithm is a simple linear congruential generator that
+is not cryptographically secure. Each result from \fBrand\fR completely
+determines all future results from subsequent calls to \fBrand\fR, so
+\fBrand\fR should not be used to generate a sequence of secrets, such as
+one-time passwords. The seed of the generator is initialized from the
+internal clock of the machine or may be set with the \fBsrand\fR function.
+.TP
+\fBround(\fIarg\fB)\fR
+If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise converts
+\fIarg\fR to integer by rounding and returns the converted value.
+.TP
+\fBsin(\fIarg\fB)\fR
+Returns the sine of \fIarg\fR, measured in radians.
+.TP
+\fBsinh(\fIarg\fB)\fR
+Returns the hyperbolic sine of \fIarg\fR. If the result would cause
+an overflow, an error is returned.
+.TP
+\fBsqrt(\fIarg\fB)\fR
+Returns the square root of \fIarg\fR. \fIArg\fR must be non-negative.
+.TP
+\fBsrand(\fIarg\fB)\fR
+The \fIarg\fR, which must be an integer, is used to reset the seed for
+the random number generator of \fBrand\fR. Returns the first random
+number (see \fBrand()\fR) from that seed. Each interpreter has its own seed.
+.TP
+\fBtan(\fIarg\fB)\fR
+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
+Converts \fIarg\fR to an integer value at least 64-bits wide (by sign-extension
+if \fIarg\fR is a 32-bit number) if it is not one already.
+.PP
+In addition to these predefined functions, applications may
+define additional functions by using \fBproc\fR (or any other method,
+such as \fBinterp alias\fR or \fBTcl_CreateObjCommand\fR) to define
+new commands in the \fBtcl::mathfunc\fR namespace. In addition, an
+obsolete interface named \fBTcl_CreateMathFunc\fR() is available to
+extensions that are written in C. The latter interface is not recommended
+for new implementations..
+.SH "SEE ALSO"
+expr(n), namespace(n)
+.SH "COPYRIGHT"
+Copyright (c) 1993 The Regents of the University of California.
+.br
+Copyright (c) 1994-2000 Sun Microsystems Incorporated.
+.br
+Copyright (c) 2005 by Kevin B. Kenny <kennykb@acm.org>. All rights reserved. \ No newline at end of file
diff --git a/doc/open.n b/doc/open.n
index 81335a1..87f0dd6 100644
--- a/doc/open.n
+++ b/doc/open.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: open.n,v 1.24 2005/04/27 18:48:24 dgp Exp $
+'\" RCS: @(#) $Id: open.n,v 1.25 2005/05/10 18:34:02 kennykb Exp $
'\"
.so man.macros
.TH open n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/pkgMkIndex.n b/doc/pkgMkIndex.n
index 2a46f6a..28b3a2f 100644
--- a/doc/pkgMkIndex.n
+++ b/doc/pkgMkIndex.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.16 2005/04/06 20:55:23 dkf Exp $
+'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.17 2005/05/10 18:34:02 kennykb Exp $
'\"
.so man.macros
.TH pkg_mkIndex n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/puts.n b/doc/puts.n
index a4d53d9..007fcc2 100644
--- a/doc/puts.n
+++ b/doc/puts.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: puts.n,v 1.9 2005/04/06 20:55:23 dkf Exp $
+'\" RCS: @(#) $Id: puts.n,v 1.10 2005/05/10 18:34:02 kennykb Exp $
'\"
.so man.macros
.TH puts n 7.5 Tcl "Tcl Built-In Commands"
diff --git a/doc/re_syntax.n b/doc/re_syntax.n
index de584c0..c3a06cc 100644
--- a/doc/re_syntax.n
+++ b/doc/re_syntax.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: re_syntax.n,v 1.7 2005/04/06 09:34:04 dkf Exp $
+'\" RCS: @(#) $Id: re_syntax.n,v 1.8 2005/05/10 18:34:02 kennykb Exp $
'\"
.so man.macros
.TH re_syntax n "8.1" Tcl "Tcl Built-In Commands"
diff --git a/doc/read.n b/doc/read.n
index 0c27b2c..59cf4c5 100644
--- a/doc/read.n
+++ b/doc/read.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: read.n,v 1.10 2005/04/06 20:55:23 dkf Exp $
+'\" RCS: @(#) $Id: read.n,v 1.11 2005/05/10 18:34:02 kennykb Exp $
'\"
.so man.macros
.TH read n 8.1 Tcl "Tcl Built-In Commands"
diff --git a/doc/regexp.n b/doc/regexp.n
index 9567824..3e4ecce 100644
--- a/doc/regexp.n
+++ b/doc/regexp.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: regexp.n,v 1.18 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: regexp.n,v 1.19 2005/05/10 18:34:02 kennykb Exp $
'\"
.so man.macros
.TH regexp n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/registry.n b/doc/registry.n
index b885fa1..d1cb370 100644
--- a/doc/registry.n
+++ b/doc/registry.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: registry.n,v 1.13 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: registry.n,v 1.14 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH registry n 1.1 registry "Tcl Bundled Packages"
diff --git a/doc/regsub.n b/doc/regsub.n
index 259f2a5..53b8dd4 100644
--- a/doc/regsub.n
+++ b/doc/regsub.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: regsub.n,v 1.14 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: regsub.n,v 1.15 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH regsub n 8.3 Tcl "Tcl Built-In Commands"
diff --git a/doc/scan.n b/doc/scan.n
index f8657dd..59a9662 100644
--- a/doc/scan.n
+++ b/doc/scan.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: scan.n,v 1.13 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: scan.n,v 1.14 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH scan n 8.4 Tcl "Tcl Built-In Commands"
diff --git a/doc/seek.n b/doc/seek.n
index bdf0747..6883b98 100644
--- a/doc/seek.n
+++ b/doc/seek.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: seek.n,v 1.8 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: seek.n,v 1.9 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH seek n 8.1 Tcl "Tcl Built-In Commands"
diff --git a/doc/string.n b/doc/string.n
index 3fe9678..8d2296d 100644
--- a/doc/string.n
+++ b/doc/string.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: string.n,v 1.27 2005/04/29 20:49:43 dgp Exp $
+'\" RCS: @(#) $Id: string.n,v 1.28 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH string n 8.1 Tcl "Tcl Built-In Commands"
diff --git a/doc/subst.n b/doc/subst.n
index 1bc058b..46572a8 100644
--- a/doc/subst.n
+++ b/doc/subst.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: subst.n,v 1.7 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: subst.n,v 1.8 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH subst n 7.4 Tcl "Tcl Built-In Commands"
diff --git a/doc/tclvars.n b/doc/tclvars.n
index 6ffb6a0..627fb6f 100644
--- a/doc/tclvars.n
+++ b/doc/tclvars.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: tclvars.n,v 1.21 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: tclvars.n,v 1.22 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH tclvars n 8.0 Tcl "Tcl Built-In Commands"
@@ -242,7 +242,20 @@ is same as the result of evaluating \fIsizeof(long)\fR in C.)
\fBtcl_precision\fR
This variable controls the number of digits to generate
when converting floating-point values to strings. It defaults
-to 12.
+.VS 8.5
+to 0. \fIApplications should not change this value;\fR it is
+provided for compatibility with legacy code.
+.PP
+The default value of 0 is special, meaning that Tcl should
+convert numbers using as few digits as possible while still
+distinguishing any floating point number from its nearest
+neighbours. It differs from using an arbitrarily high value
+for \fItcl_precision\fR in that an inexact number like \fI1.4\fR
+will convert as \fI1.4\fR rather than \fI1.3999999999999999\fR
+even though the latter is nearer to the exact value of the
+binary number.
+.VE 8.5
+.PP
17 digits is ``perfect'' for IEEE floating-point in that it allows
double-precision values to be converted to strings and back to
binary with no loss of information. However, using 17 digits prevents
diff --git a/doc/tell.n b/doc/tell.n
index d4d44c0..a25b111 100644
--- a/doc/tell.n
+++ b/doc/tell.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: tell.n,v 1.8 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: tell.n,v 1.9 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH tell n 8.1 Tcl "Tcl Built-In Commands"
diff --git a/doc/unload.n b/doc/unload.n
index bd66df6..8a2e51c 100644
--- a/doc/unload.n
+++ b/doc/unload.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: unload.n,v 1.7 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: unload.n,v 1.8 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH unload n 8.5 Tcl "Tcl Built-In Commands"
diff --git a/doc/unset.n b/doc/unset.n
index 53c91c1..036429f 100644
--- a/doc/unset.n
+++ b/doc/unset.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: unset.n,v 1.9 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: unset.n,v 1.10 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH unset n 8.4 Tcl "Tcl Built-In Commands"
diff --git a/doc/upvar.n b/doc/upvar.n
index 28048e7..acce716 100644
--- a/doc/upvar.n
+++ b/doc/upvar.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: upvar.n,v 1.11 2005/04/06 20:55:24 dkf Exp $
+'\" RCS: @(#) $Id: upvar.n,v 1.12 2005/05/10 18:34:03 kennykb Exp $
'\"
.so man.macros
.TH upvar n "" Tcl "Tcl Built-In Commands"
diff --git a/doc/variable.n b/doc/variable.n
index 080dc44..fa99930 100644
--- a/doc/variable.n
+++ b/doc/variable.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: variable.n,v 1.7 2005/02/16 18:52:24 msofer Exp $
+'\" RCS: @(#) $Id: variable.n,v 1.8 2005/05/10 18:34:04 kennykb Exp $
'\"
.so man.macros
.TH variable n 8.0 Tcl "Tcl Built-In Commands"