diff options
author | Kevin B Kenny <kennykb@acm.org> | 2005-05-10 18:33:37 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2005-05-10 18:33:37 (GMT) |
commit | 76e3b5eed61a674bce7f9c1e18380842dcff3fbf (patch) | |
tree | 2f108341f2c542f48532e6057d79bfa551a4245f /ChangeLog | |
parent | 5b510b75ec4a1d6fb55691bcf55dbf4b0b936624 (diff) | |
download | tcl-76e3b5eed61a674bce7f9c1e18380842dcff3fbf.zip tcl-76e3b5eed61a674bce7f9c1e18380842dcff3fbf.tar.gz tcl-76e3b5eed61a674bce7f9c1e18380842dcff3fbf.tar.bz2 |
Merged kennykb-numerics-branch back to the head; TIPs 132 and 232
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 343 |
1 files changed, 343 insertions, 0 deletions
@@ -1,8 +1,49 @@ +2005-05-10 Kevin Kenny <kennykb@acm.org> + + Merged all changes on kennykb-numerics-branch back into the + HEAD. TIP's 132 and 232 are now Final. + +2005-05-10 Kevin Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] Merged changes from HEAD. + 2005-05-10 Miguel Sofer <msofer@users.sf.net> * generic/tclExecute.c (ExponLong, ExponWide): fixed special case 'i**0' for i>0 [Bug 1198892] +2005-05-09 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + * win/tclWin32Dll.c (TclpCheckStackSpace, TclWinCPUID): + Reworked structured event handling to function even + with -fomit-frame-pointers. + +2005-05-08 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + * generic/tclStrToD.c: Made code more portable by finding a + workaround for MSVC's 'volatile' issue that + does not require conditional compilation. + * win/tclWin32Dll.c (TclWinCPUID): Removed structured event + handling from the GCC code + since (a) bad code is generated + by the instruction scheduling + with -O2, and (b) it's not + needed on any reasonably modern + CPU. + +2005-05-07 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + * generic/tclEvent.c: Moved initialization of tclStrToD.c's + * generic/tclInt.h: static constants into a procedure called + * generic/tclStrToD.c: from TclInitSubsystems to avoid double + checked locking protocol. Cleaned up + an issue where MSVC ignored the 'volatile' + specifier, causing incorrect comparison + of an underflowed number against zero. + 2005-05-06 Jeff Hobbs <jeffh@ActiveState.com> * unix/tcl.m4, unix/configure: correct Solaris 10 (5.10) check and @@ -10,6 +51,10 @@ 2005-05-05 Kevin B. Kenny <kennykb@acm.org> + [kennykb-numerics-branch] Merged with HEAD. + +2005-05-05 Kevin B. Kenny <kennykb@acm.org> + * win/tclWinThrd.c: Corrected a compilation error on the --enable-threads configuration. @@ -102,6 +147,33 @@ * doc/open.n: "BINARY" in "access" argument to [open]. * tests/ioCmd.test: +2005-04-26 Kevin B. Kenny <kennykb@users.sourceforge.net> + + * generic/tclBinary.c (FormatNumber): + Dredge the NaN out of the internal representation if + Tcl_GetDoubleFromObj returns TCL_ERROR on a NaN. + + * generic/tclObj.c (Tcl_GetDoubleFromObj): + Restored silent overflow/underflow behaviour that the merge + of 2004-04-25 messed up. Thanks to Don Porter for calling + attention to this bug. Also removed an uninitialised memory + reference in this function that valgrind caught. Also changed + to return TCL_ERROR on a pure NaN. + + * generic/tclStrToD.c (RefineResult): + Added a test for the initial approximation being HUGE_VAL; + this test avoids EDOM being returned from ldexp on some platforms + on input values exceeding the floating point range. + + * tests/expr.test (expr-29.*, expr-30.*): + Added further tests of overflow/underflow on input conversions. + +2005-04-25 Kevin B. Kenny <kennykb@users.sourceforge.net> + + [kennykb-numerics-branch] Merged with HEAD. + + * doc/CrtMathFunc.n: Revised documentation for TIP 232 + 2005-04-25 Daniel Steffen <das@users.sourceforge.net> * compat/string.h: fixed memchr() protoype for __APPLE__ so that we @@ -230,6 +302,12 @@ if this change causes trouble, but it seems more sensible to let Tcl's "on-demand" shimmering rule, and not try to pre-guess things. +2005-04-20 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + * doc/expr.n: + * doc/mathfunc.n (new file): Revised documentation for TIP 232 + 2005-04-20 Don Porter <dgp@users.sourceforge.net> * generic/tclGet.c (Tcl_GetInt): Corrected error that did not @@ -383,6 +461,15 @@ Tcl 8.5 (on which it was dependent anyway). Also added a [package require] line to formalize the relationship. +2005-04-11 Kevin Kenny <kennykb@users.sf.net> + + [kennykb-numerics-branch] Merged with HEAD. Updated to libtommath 0.35. + + * generic/tclBasic.c: Attempted to repeat changes that applied + to tclExecute.c in Miguel Sofer's commit of 2005-04-01, together + with (possibly) a few more uses of his new object creation macros. + Also plugged a memory leak in TclObjInvoke. [Bug 1180368] + 2005-04-10 Kevin Kenny <kennykb@acm.org> * library/tzdata/America/Montevideo: @@ -559,6 +646,29 @@ * unix/tcl.m4: Updated the OpenBSD configuration and regenerated * unix/configure: the configure script. +2005-03-15 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] Merged with HEAD. + + * generic/tclBasic.c (many): + * generic/tclCompExpr.c (CompileMathFuncCall): + * generic/tclCompile.h: + * generic/tclExecute.c (many): + * generic/tclParseExpr.c (ParsePrimaryExpr): + * tests/compExpr-old.test: + * tests/compExpr.test: + * tests/compile.test: + * tests/expr-old.test: + * tests/expr.test: + * tests/for.test: + * tests/parseExpr.test: + Initial implementation of TIP #232. + + * generic/tclObj.c (Tcl_DbNewBignumObj): Fixed typo that broke + --enable-symbols=mem build + * tests/binary.test (binary-40.3, binary-40.6): Corrected tests + to allow NaN(7ffffffffffff). + 2005-03-14 Miguel Sofer <msofer@users.sf.net> * generic/tclExecute.c: fixed INST_PUSH1's debugging code (wrong @@ -583,6 +693,30 @@ into private. Should be used only by internal workings of execution traces. +2005-03-09 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] Merged from HEAD. + + * doc/PrintDbl.3: + * doc/tclVars.n: Documented new semantics for tcl_precision. + * generic/tclExecute.c (Tcl_ExecuteByteCode): Removed the check + for division-by-zero on IEEE-754 machines. + * generic/tclUtil.c (Tcl_PrintDouble): Corrected bug where numbers + in the range [1e-4 .. 1.) were printed incorrectly. + * tests/compExpr-old.test (compExpr-old-11.13): Revised test + case for division by zero + * tests/expr-old.test (expr-34.11, expr-34.12): Revised test + cases for overflow in pow() to deal with infinities. + * tests/expr.test (expr-11.13, expr-29.1, expr-29.2): Revised + test case for division by zero and for underflow on input + conversions. + * tests/parseExpr.test (parseExpr-16.11): Revised test case for + overflow on input conversion. + * tests/string.test (string-6.38 deleted): Removed test case + for underflow on input conversion, which is no longer an error. + * tests/util.test (util-10.*): Added test case for the bug in + tclUtil.c. + 2005-03-08 Jeff Hobbs <jeffh@ActiveState.com> * win/makefile.vc: clarify necessary defined vars that can come @@ -598,6 +732,82 @@ fixed the peephole opt in INST_POP so that it is not used when TCL_COMPILE_DEBUG is defined. +2005-03-04 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + + * generic/tclCmdMZ.c: Changed [scan] to treat out-of-range + floating point values as infinities and zeroes. + * generic/tclExecute.c: Changed [expr] to be permissive about + infinities, allowing them to propagate. + * generic/tclGet.c: Changed Tcl_GetDouble to be permissive about + over/underflow. + * generic/tclObj.c: Changed SetDoubleFromAny to be permissive + about over/underflow. + * generic/tclParseExpr.c: Made [expr] permissive about input + numbers out of range. + +2005-03-03 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + + * generic/tclInt.h: + * generic/tclStrToD.c (Tcl_DoubleDigits, TclFormatNaN): + * generic/tclUtil.c (Tcl_PrintDouble): + Changed the signature of TclDoubleDigits so that it + accepts a pointer to the signum of the argument, and + returns the signum via that pointer. Added very + hacky code to handle IEEE signed zeroes in Tcl_DoubleDigits. + (It can't be done other than as a hack until C9x; + C89 simply doesn't deal with the concept of -0.0). + Added output conversion of tagged NaN values. + * generic/tclBinary.c (FormatNumber): + Changed to allow [binary format] to handle NaN. + * tests/binary.test (binary-60.1): + Added a quick-n-dirty test to make sure that NaN's + can be scanned and formatted. + * generic/tclParseExpr.c (GetLexeme, ParseMaxDoubleLength): + Modified so that tagged NaN (e.g., NaN(DEADBEEF)) can + be recognized. + +2005-03-02 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] Merged with HEAD as of 2005-02-23. + + * generic/tclExecute.c: + Broadened test for NaN to work on Windows. + * generic/tclInt.h: + * generic/tclStrToD.c (Tcl_DoubleDigits): + * generic/tclUtil.c (Tcl_PrintDouble, TclPrecTraceProc): + Added Tcl_DoubleDigits to format 'double' numbers + with the minimum number of significant digits to + yield correct rounding. Modified tcl_precision to + accept 0 as a precision (meaning "minimum digits"), and + made 0 the default. [TIP #132] + * generic/tclObj.c: + Made NaN's throw an error in Tcl_GetDoubleFromObj. + * unix/Makefile.in: + * win/Makefile.in: + * win/makefile.vc: + Added libtommath/bn_mp_init_set.c to the build. + * libtommath/tommath.h (mp_iseven): + Fixed a bug that caused zero to test 'odd'. + * generic/tommath.h: + Regenerated. + * tests/binary.test: + * tests/expr-old.test: + * tests/expr.test: + * tests/scan.test: + Corrected a number of tests that depended on + tcl_precision, and removed the {eformat} condition + from tests that no longer require it. + * tests/util.test: + Corrected a number of tests that depended on + tcl_precision, and removed the {eformat} condition + from tests that no longer require it. Added a series + of tests for correct rounding in Tcl_PrintDouble. [TIP + #132]. + 2005-03-01 David N. Welton <davidw@dedasys.com> * doc/CrtSlave.3: Changed to Tcl_Object to Tcl_Obj in the man @@ -659,6 +869,17 @@ * doc/CrtChannel.3: Typo: return->returns. +2005-02-06 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + + * generic/tclStrToD.c (TclStrToD, SafeLdExp): + Added code to manage the FPU precision on gcc+x86. + Enabled fast conversion of floats with small exponents + now that precision is correct. + * tests/expr.test: Corrected test for the smallest representible + value to the right IEEE values. + 2005-02-06 David N. Welton <davidw@dedasys.com> * doc/Thread.3: One-word grammar fix. @@ -673,6 +894,18 @@ * generic/tclPathObj.c: Cleaned up typo in comment. +2005-02-03 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + + * generic/tclStrToD.c (TclStrToD, RefineResult, SafeLdExp): + Added code to ensure that 'ldexp' is never called with + a value that will underflow. + * tests/expr.test: Added tests for the smallest representible + value, and rounding between it and zero. (The tests reflect + current behaviour; plan is to change the specification of + Tcl so that input conversion of doubles underflows silently.) + 2005-02-02 Mo DeJong <mdejong@users.sourceforge.net> * generic/tclProc.c (TclInitCompiledLocals): @@ -684,6 +917,35 @@ down a crash in Itcl, that crash is fixed by Itcl patch 1115085. +2005-02-01 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] Merged with HEAD as of today. + + * generic/tclInt.decls: + Changed numbers of new stubs to resolve a conflict. + * generic/tclInt.h: + Added new TclStrToD routine that replaces the native + 'strtod' thro + ughout Tcl. + * generic/tclCmdMZ (Tcl_StringObjCmd): + * generic/tclGet.c (Tcl_GetDouble): + * generic/tclObj.c (SetBooleanFromAny, SetDoubleFromAny): + * generic/tclParseExpr.c (GetLexeme): + * generic/tclScan.c (Tcl_ScanObjCmd): + Replaced all uses of the native 'strtod' with a TclStrToD + routine that performs correct rounding and handles denormals. + * generic/tclStrToD.c: (new file) + New scanning function for extracting 'double' from a string + that rounds correctly, and handles denormals and infinities. + * unix/Makefile.in: + * win/Makefile.in: + * win/makefile.vc: + Added tclStrToD.c and the tommath routines that support it. + + These changes represent a partial implementation of TIP #132. + Output conversion of floating point numbers, and proper handling + of infinities within expressions, still need to be addressed. + 2005-02-01 Don Porter <dgp@users.sourceforge.net> * generic/tclExecute.c (TclCompEvalObj): Removed stray statement @@ -780,6 +1042,87 @@ * doc/FileSystem.3: Add missing ARGUMENTS section definitions for arguments to Tcl_FSLink. [Bug 1106272] +2005-01-21 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] + + * unix/Makefile.in: Updated Makefile to build libtommath on + Unix as well as Windows. [Bug 1106865] + + * generic/tclTestObj.c (TestbignumobjCmd): + Silenced a compiler warning about a mismatched 'const'. + +2005-01-20 Kevin B. Kenny <kennykb@acm.org> + + [kennykb-numerics-branch] Development checkpoint. + + * compat/strtoll.c: Reverted to HEAD. + * compat/strtoull.c: + * doc/Ensemble.3: + * generic/tclBasic.c: + * generic/tclCmdIL.c: + * generic/tclNamesp.c: + * generic/tclPathObj.c: + * generic/tclPort.h: + * unix/configure: + * unix/configure.in: + * unix/tcl.m4: + * win/configure: + * win/configure.in: + * win/rules.vc: + * win/tcl.m4: + + * generic/tcl.h: Added declarations for bignum types, and + for a 'bignumValue' in the Tcl_Obj structure. + * generic/tclInt.h: Added declarations of interface procedures + for memory allocation in libtommath. + + * generic/tcl.decls: Added new interface to bignum objects. + * generic/tclInt.decls: Added internal stubs for bignum routines + used by the test code in tclTestObj.c. + + * generic/tclDecls/h: Regen. + * generic/tclIntDecls.h: + * generic/tclStubInit.h: + + * tools/fix_tommath_h.tcl: (New file) Script to edit + libtommath/tommath.h and produce + generic/tommath.h so that storage + classes, allocation routines, and + data types conform to Tcl's + conventions. + * generic/tommath.h: (New file) Generated by the above. + + * generic/tclTomMath.h: (New file) Additional declarations + to be included in tommath.h when building + Tcl. + + * generic/tclTomMathInterface.c: (New file) Small 'glue' routines + adapting tommath's API to Tcl. + + * libtommath/bn_fast_s_mp_mul_digs.c: + * libtommath/bn_mp_mul_d.c: + * libtommath/bn_mp_read_radix.c: + * libtommath/tommath.h: Applied suggested changes from Tom St + Denis that correct an off-by-one error in single-digit + multiplication (leading to a pointer smash if uncorrected) and + change the string argument to 'mp_read_radix' from 'char*' to + 'const char*'. + + * libtommath/bn_mp_radix_size.c: + Local patch to ensure that sufficient memory is requested + even if the number has a single digit. + + * libtommath/bn_mp_read_radix.c: + Local patch to return MP_VAL if the input string contains + an invalid character. + + * generic/tclObj.c: Added accessor functions for bignums. + * generic/tclTestObj.c: Added a 'testbignumobj' command to + exercise the accessor functions for bignums. + + * win/Makefile.in: Added rules for making libtommath. + 2005-01-19 Donal K. Fellows <donal.k.fellows@man.ac.uk> TIP#235 IMPLEMENTATION |