generated from saxbophone/CPP20-Cross-Platform-Template
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Current code for pow() uses divide-and-conquer recursion to avoid a degenerate-case linear recursion, which is very very very slow for large exponents.
However, we still manually repeatedly divide the exponent by
This repeated division is equivalent to calculating the base-2 logarithm, ilog() function to do this instead.
Whenever our exponent is not an exact power of