Anonymous user
Addition-chain exponentiation: Difference between revisions
m
→{{header|Tcl}}: some notes
(→Tcl: Added implementation) |
m (→{{header|Tcl}}: some notes) |
||
Line 472:
Using code at [[Matrix multiplication#Tcl]] and [[Matrix Transpose#Tcl]] (not shown here).
{{trans|Go}}
<lang tcl># Continued fraction addition chains, as described in "Efficient computation
<lang tcl>package require Tcl 8.5▼
# of addition chains" by F. Bergeron, J. Berstel, and S. Brlek, published in
# Journal de théorie des nombres de Bordeaux, 6 no. 1 (1994), p. 21-38,
# accessed at http://www.numdam.org/item?id=JTNB_1994__6_1_21_0.
#
# Uses the dichotomic strategy, which produces good results with simpler
# coding than for a pluggable non-deterministic strategy.
namespace path {::tcl::mathop ::tcl::mathfunc}
|