diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2010-11-30 20:59:27 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2010-11-30 20:59:27 (GMT) |
commit | 80c48dec26fcf255d9b1ad6140911b40f71726e2 (patch) | |
tree | 1690548d2a2cd82215101f59ba6632c4b01cc523 /generic/tclTomMathDecls.h | |
parent | 9fef6968a9971c094e0945448a9589f4e796e938 (diff) | |
download | tcl-80c48dec26fcf255d9b1ad6140911b40f71726e2.zip tcl-80c48dec26fcf255d9b1ad6140911b40f71726e2.tar.gz tcl-80c48dec26fcf255d9b1ad6140911b40f71726e2.tar.bz2 |
* generic/tclInt.decls: Backport of Kevin B. Kenny's work on
* generic/tclInt.h: the Tcl Head, with help from Jeff Hobbs.
* generic/tclStrToD.c:
* generic/tclTest.c:
* generic/tclTomMath.decls:
* generic/tclUtil.c:
* tests/util.test:
* unix/Makefile.in:
* win/Makefile.in:
* win/makefile.vc: Rewrite of Tcl_PrintDouble and TclDoubleDigits
that (a) fixes a severe performance problem with floating point
shimmering reported by Karl Lehenbauer, (b) allows TclDoubleDigits
to generate the digit strings for 'e' and 'f' format, so that it
can be used for tcl_precision != 0 (and possibly later for [format]),
(c) fixes [Bug 3120139] by making TclPrintDouble inherently
locale-independent, (d) adds test cases to util.test for
correct rounding in difficult cases of TclDoubleDigits where fixed-
precision results are requested. (e) adds test cases to util.test for
the controversial aspects of [Bug 3105247]. As a side effect, two
more modules from libtommath (bn_mp_set_int.c and bn_mp_init_set_int.c)
are brought into the build, since the new code uses them.
* generic/tclIntDecls.h:
* generic/tclStubInit.c:
* generic/tclTomMathDecls.h: Regenerated.
FossilOrigin-Name: 769801ace1040dc40a1bcbc3f02ea15b8258c8fb
Diffstat (limited to 'generic/tclTomMathDecls.h')
-rw-r--r-- | generic/tclTomMathDecls.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index a626cde..d3986b4 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTomMathDecls.h,v 1.2.4.1 2010/02/07 22:16:54 nijtmans Exp $ + * RCS: @(#) $Id: tclTomMathDecls.h,v 1.2.4.2 2010/11/30 20:59:28 andreas_kupries Exp $ */ #ifndef _TCLTOMMATHDECLS @@ -79,6 +79,7 @@ #define mp_init_copy TclBN_mp_init_copy #define mp_init_multi TclBN_mp_init_multi #define mp_init_set TclBN_mp_init_set +#define mp_init_set_int TclBN_mp_init_set_int #define mp_init_size TclBN_mp_init_size #define mp_karatsuba_mul TclBN_mp_karatsuba_mul #define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr @@ -96,6 +97,7 @@ #define mp_rshd TclBN_mp_rshd #define mp_s_rmap TclBNMpSRmap #define mp_set TclBN_mp_set +#define mp_set_int TclBN_mp_set_int #define mp_shrink TclBN_mp_shrink #define mp_sqr TclBN_mp_sqr #define mp_sqrt TclBN_mp_sqrt @@ -451,6 +453,16 @@ EXTERN int TclBN_s_mp_sqr(mp_int *a, mp_int *b); /* 60 */ EXTERN int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c); #endif +#ifndef TclBN_mp_init_set_int_TCL_DECLARED +#define TclBN_mp_init_set_int_TCL_DECLARED +/* 61 */ +EXTERN int TclBN_mp_init_set_int(mp_int*a, unsigned long i); +#endif +#ifndef TclBN_mp_set_int_TCL_DECLARED +#define TclBN_mp_set_int_TCL_DECLARED +/* 62 */ +EXTERN int TclBN_mp_set_int(mp_int*a, unsigned long i); +#endif typedef struct TclTomMathStubs { int magic; @@ -517,6 +529,8 @@ typedef struct TclTomMathStubs { int (*tclBN_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 58 */ int (*tclBN_s_mp_sqr) (mp_int *a, mp_int *b); /* 59 */ int (*tclBN_s_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 60 */ + int (*tclBN_mp_init_set_int) (mp_int*a, unsigned long i); /* 61 */ + int (*tclBN_mp_set_int) (mp_int*a, unsigned long i); /* 62 */ } TclTomMathStubs; #ifdef __cplusplus @@ -777,6 +791,14 @@ extern TclTomMathStubs *tclTomMathStubsPtr; #define TclBN_s_mp_sub \ (tclTomMathStubsPtr->tclBN_s_mp_sub) /* 60 */ #endif +#ifndef TclBN_mp_init_set_int +#define TclBN_mp_init_set_int \ + (tclTomMathStubsPtr->tclBN_mp_init_set_int) /* 61 */ +#endif +#ifndef TclBN_mp_set_int +#define TclBN_mp_set_int \ + (tclTomMathStubsPtr->tclBN_mp_set_int) /* 62 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ |