Closed Arithmomaniac closed 3 months ago
Rewritten using generic math, but fundamentally yes, it's the same.
Yeah, just a nitpick to link to the solution rather than the question. (I can make the PR myself if requested.)
Yeah, link to the solution is more precise. You can submit PR.
https://github.com/dotnet/dotNext/blob/b20da06268a9b51ca4a767f308ad43bcf45c6460/src/DotNext/Numerics/Number.cs#L134C9-L134C121
It appears the actual algo is this exact answer to the question? https://math.stackexchange.com/a/4674078