Jump to content

Matrix-exponentiation operator: Difference between revisions

→‎{{header|BQN}}: Add repeated squaring version
(add bqn)
(→‎{{header|BQN}}: Add repeated squaring version)
Line 408:
┘ ┘ ┘ ┘ ┘
┘</lang>
 
For larger exponents it's more efficient to use a fast exponentiation pattern that builds large powers quickly with repeated squaring, then multiplies the appropriate power-of-two exponents together.
 
<lang bqn>MatEx ← MatMul{𝔽´𝔽˜⍟(/2|⌊∘÷⟜2⍟(↕1+·⌊2⋆⁼⊢)𝕩)𝕨}</lang>
 
=={{header|Burlesque}}==
99

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.