Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2016-11-18
10:15 • Ticket [e6f27aa56f] Update libtommath to 1.0 status still Closed with 6 othe... artifact: 2f4cc79100 user: gahr
09:51 • Closed ticket [e6f27aa56f]. artifact: 49e664287a user: jan.nijtmans
09:50
Fix [e6f27aa56fa51bfc1752ce768bf0d301c60bfd2c|e6f27aa56f]: Update libtommath to 1.0 check-in: 6d14b81579 user: jan.nijtmans tags: trunk
2016-11-17
11:45 • Ticket [e6f27aa56f] Update libtommath to 1.0 status still Open with 4 other ... artifact: d6a18527b7 user: jan.nijtmans
2016-03-13
17:23
[e6f27aa56f] Add files I missed in my previous commit check-in: 7625571c31 user: gahr tags: gahr-ticket-e6f27aa56f
2016-03-11
17:13
[e6f27aa56f] Initial import of libtommath-1.0 This commit brings in libtommath-1.0, as of tag v1.0 ... check-in: c7a3a1452b user: gahr tags: gahr-ticket-e6f27aa56f
14:06 • Ticket [e6f27aa56f] Update libtommath to 1.0 status still Open with 4 other ... artifact: b7919ca12b user: gahr
2016-03-10
19:32 • Ticket [e6f27aa56f]: 4 changes artifact: ac86fb2e23 user: dgp
07:04 • New ticket [e6f27aa56f]. artifact: 2e6c4afa2b user: gahr

Update libtommath to 1.0

Closed / Fixede6f27aa56fa51bfc1752ce768bf0d301c60bfd2cCreated 11 years agoUpdated 10 years ago
Descriptionplain2016-03-10 07:04:18
This is to track the work to update the bundled libtommath to version 1.0.
Referenced by3
  • 6d14b81579Fix [e6f27aa56fa51bfc1752ce768bf0d301c60bfd2c|e6f27aa56f]: Update libtommath to 1.0 check-in2016-11-18 09:50:37
  • 7625571c31[e6f27aa56f] Add files I missed in my previous commit check-in2016-03-13 17:23:31
  • c7a3a1452b[e6f27aa56f] Initial import of libtommath-1.0 This commit brings in libtommath-1.0, as of tag v1.0 of the upstream repository at https://github.com/libtom/libtommath. Only the top-level directory has been imported: the demo, etc, logs, mtest, pics, pre_gen, and tombc directories have been removed from our repo. The stubs tables have been regenerated to accomodate for the new function: mp_expt_d_ex(mp_int *a, mp_digit b, mp_int *c, int fast); See https://github.com/libtom/libtommath/commit/e9b1837 for details. Only the unix build system has been modified for now. Windows and Mac OSX will come later. check-in2016-03-11 17:13:38
dgpplain2016-03-10 19:32:36

Handing off to kbk in hopes he'll have time to take a look.

IIRC, though, over time 'our' libtommath became more of a 
fork than a bundle, so there may be some limit to how much
we can or want to take from the upstream update.

If we move on this, my initial take is that it should be
a trunk-only effort - 8.7+.
gahrplain2016-03-11 14:06:37
Thanks for your comments Donald.

So far I have identified the following changes in our version compared to upstream.

* we fixed mp_iseven(a) to return true if a is 0 - thanks kbk for mentioning
* we const'ified many function arguments - e.g., int mp_copy(const mp_int *a, mp_int *b)
* we improved the performance of mp_sqrt

There might be more subtle differences, I'm being very careful in reviewing the diffs.

I already have a unix-only working version, I'll tackle Windows makefiles and X-Code projects later.

I also have a few points to figure out:

* is the TCL_TOMMATH define needed? (AC_DEFINE(TCL_TOMMATH, 1, [Build libtommath?]))
* is the tcl::tommath dummy package needed? Can't we somehow merge the tommath stubs table with the main one?

To be continued...
jan.nijtmansplain2016-11-17 11:45:24
Work is completed in "libtommath-1.0" branch. A test-case is added for mp_iseven(), so it cannot be missed in the future any more.

Please have a look, anyone interested. In a few days I would like to merge this to trunk.

The TCL_TOMMATH is - indeed - not needed for anything anymore (actually - it never was). The tcl::tommath package is needed for any extensions which want to use libtommath through the Tcl library, we cannot do any re-organization until Tcl 9.0.
jan.nijtmansplain2016-11-18 09:51:53
Committed to trunk. Will be in Tcl 8.7.
gahrplain2016-11-18 10:15:43
Thanks Jan for resuming this and bringing it to completion!
Log in (anonymous is fine) to add a comment.