4 ms·
I have not profiled the code, but I expect that the Newtonian approximation of sqrt is the slowest part. It would surprise me if "powers" was a big problem rel
by ephemient 15y ago
I have not profiled the code, but I expect that the Newtonian approximation of sqrt is the slowest part.
It would surprise me if "powers" was a big problem relative to the rest. And no shortcuts: each of [1, b b², b³, b⁴, b⁵, …] (up to n) is used in the binomial expansion.