Einzelnen Beitrag anzeigen

Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
15.774 Beiträge
 
#1

Integer division by constant

  Alt 1. Feb 2016, 20:10
If divisor is fixed, the division operation can be replaced by multiplication by a reciprocal; the idea is very simple: x / d = x * (1/d); since d is fixed we can precompute 1/d and use faster multiplication operation. This trick works*for integer division, with some additional complications. For ...

More...
  Mit Zitat antworten Zitat