OKDbug wrote:waskol wrote:Chema.... Dbug...
I think we can use dichotomy without a loss of precision....
(...)The trick is to simulate the floating point division with the use of an extra byte for Xa,Xb,Ya,Yb,Xc and Yc. We will work with 16 bits for the integer part plus an extra 8 bits for fractional part.Dbug wrote:In that case, a solution for me would be to use three bytes and do some fixed point operations like 16.8 shift and add. The additional cost is very light, and the accuracy probably a lot better.
For sure we will have the exact result, and no pixel shift.
Fast, straight, without any division or multiplication
Looks like we are talking of the same thing.
24 bits based dichotomy, 16 bits integer part, 8 bits decimals.
The precision is very good, no problem