News for hackers. Stuff that matters.
Re:Why is division so much more complex than other arithmeti... by pdonis on Friday August 11, 2023 @04:01PM (#37093289)
If you know the divisor x ahead of time you can pre-compute 1/x at compile time, so that your actual compiled code never does the division--only your compiler does. Your actual compiled code just does the multiplication by a pre-computed constant (and the compiled code doesn't have to know that that constant was pre-computed as the reciprocal of x).
Re:Why is division so much more complex than other arithmeti... by shmerl on Friday August 11, 2023 @04:19PM (#37093510)
Ah, thanks for clarifying.