tubeshowcase●1,658,498 videos♡ My collection 0
← Learn to Code

Learn to Code12:39

Fast pow! A general recursive power algorithm for more than just numbers.

mCoding ↗

From the creator

Pow but faster? A recursive algorithm in Python to compute x to the power n. But wait! We already have the exponentiation operator (**), so what could it be good for? We have to go beyond and consider more general operations than just regular multiplication of integers. ― mCoding with James Murphy (https://mcoding.io) Efficient exponentiation vid: https://youtu.be/BfNlzdFa_a4 Source code: https://github.com/mCodingLLC/VideosSampleCode SUPPORT ME ⭐ --------------------------------------------------- Sign up on Patreon to get your donor role and early access to videos! https://patreon.com/mCoding Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.) https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Want to donate crypto? Check out the rest of my supported donations on my website! https://mcoding.io/donate Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information BE ACTIVE IN MY COMMUNITY 😄 --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.com/r/mCoding/ Facebook: https://www.facebook.com/james.mcoding CHAPTERS --------------------------------------------------- 0:00 Intro 0:30 Slow pow 1:13 Fast pow for ints 3:00 Fast pow for monoids 8:49 Fast pow for semigroups 9:39 Repeated convolution gives bell curve 11:46 Rambling and thanks

Published 2023-01-16 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code