Addition-chain exponentiation: Difference between revisions
Content added Content deleted
Line 1,056: | 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. |
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 |
<syntaxhighlight lang="julia">import Base.iterate |
||
using LinearAlgebra |
|||
mutable struct AdditionChains{T} |
mutable struct AdditionChains{T} |