Addition-chain exponentiation: Difference between revisions

Content deleted Content added
Wherrera (talk | contribs)
Wherrera (talk | contribs)
Line 1,056:
Uses an iterator to generate A003313 (the first 100 values). Uses the Knuth path method for the larger integers. This gives a chain length of 18 for both 27182 and 31415.
<syntaxhighlight lang="julia">import Base.iterate
using LinearAlgebra
 
mutable struct AdditionChains{T}