News for hackers. Stuff that matters.
Re:Why is division so much more complex than other arithmeti... by ridiculous_fish on Friday August 11, 2023 @03:56PM (#37093243)
To clarify, there are two separate notions of division-as-multiplication discussed here.

Modular division is straightforward to convert to a multiplication; however this is mainly for specialized applications, like cryptography and number theory. It's uncommon to want divide-by-2 to make the value larger.

Ordinary flooring division can also be converted to a multiplication problem when the dividend is bounded. This uses the "magic number" approach where you multiply by a rounded scaled reciprocal, and then do some work to correct the error from rounding.

There are no comments on this comment yet.