You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hm. I'm not sure the extensions on Nonzero<T> are worth the headache. I don't really want to juggle guarantee types (#62). It might be better to just pick the most lenient set that promises nonoptional results and stick with it. In this case, that would be Natural<T>. It's an extra is-zero check, but it's also a more straightforward type conversion story. Natural<T> might be the best fit even if I had some kind of Nonzero<Natural<T>> type (#78), in part because the Nonzero<T> hoist could become redundant if I change the algorithm.
The internal UnsignedInteger.isqrt(natural: Nonzero<Self>) helper method approach is a bit faster, for reasons unclear to me, even when the is-zero check is performed. But, getting the function count down to 4 (from 6) is nice.
I'll add some binary integer square root methods.
The text was updated successfully, but these errors were encountered: