News for hackers. Stuff that matters.
Re:How do compilers optimize divisions? by amelius on Monday February 20, 2017 @05:07PM (#13691432)
It could also be a neat trick around the Intel Pentium's FDIV bug, [1].

[1] https://en.wikipedia.org/wiki/Pentium_FDIV_bug

Re:How do compilers optimize divisions? by lfowles on Monday February 20, 2017 @05:11PM (#13691463)
I'm not sure I follow your line of thought given the post is talking integer division and FDIV is floating point division.
Re:How do compilers optimize divisions? by amelius on Monday February 20, 2017 @05:51PM (#13691758)
Well, you can build a floating point DIV out of an integer DIV, I suppose. Roughly speaking, you divide the (integer) mantissa, and subtract the exponent, and you normalize.
Re:How do compilers optimize divisions? by bbcbasic on Monday February 20, 2017 @09:04PM (#13692642)
Cool. Time to dust off that old PC in the attic.
Re:How do compilers optimize divisions? by Sohcahtoa82 on Tuesday February 21, 2017 @06:57PM (#13701472)
Because people are totally going to be concerned about working around a bug that was fixed over 20 years ago.