Hi Hebemabo,
You can get the same results with ...
Code:
circ = puls ** 28922 + R2.15
Dividing fractional numbers is fairly difficult.
But multiplying them is easy.
Dividing by 2.266 is the same as multiplying times 0.44130626654898499558693733451015 ... (1/2.266)
And you can do that with the ** operator.
Multiply 0.44130626654898499558693733451015 * 65536 and you get 28922 rounded up.
The ** operator is essentially a multiply with an implied /65536.
So puls * 28922 / 65536 is the same as puls / 2.266.
The R2.15 takes the high bit of the low word from the multiplication.
It acts the same as your "round to 1mm".
Bookmarks