Skip to content

Comment on Why is division so much more complex than other arithmetic operations?

Comments

I assume for most programming languages there is no speed difference in writing

   y = x/5.0
vs.
   y = 0.2 * x
Is that true?

Yes, but computing an integer into it's reciprocal (which is what you're doing in decimal) is the computation that makes it more complex, you're just offloading that from the machine to your head. Try doing this with x/31, show me the operation to convert 31 into it's reciprocal in decimal and you'll see where the complexity lies.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.