Share your repls and programming experiences

← Back to all posts
Multiplication Weekly Challenge
a5rocks (821)

Yes it's recursion but oh well I can't think of how to do it without said recursion.

This does at best y additions and at worst x + y additions. Probably.

It also has a test suite to show it works.

It handles both x and y being floats, but approximates the answer, so it will be wrong by x%1 * y%1 (I think, I'm no mathematical genius). However this does not at all use inverse division.