I've been implementing point addition into a c++ program I've written but I don't see how this can be done right. When I do
slope = (y1 - y2)/(x1 - x2) I get a freaking decimal, which doesn't produce the proper points when applied to the other parts of the equation due to it not retaining its fractional qualities. Anyone have any ideas how how to get past that?
Point Addition being defined by the following equation:
slope = (y1 - y2) / (x1 - x2) xsum = slope ^ 2 - (x1 + x2) ysum = slope * (x1 - xsum) - y1
Whereby Private Address x02 with x,y coordinates respectively:
with the Point Addition of Private Address x01 with x,y coordinates respectively:
applied to the above equation produce the result of Private Address x03 with x,y coordinates respectively:
I put this C++ program together, and I've modified in every way I can think of (moving %p around, doing it too many times, breaking up the equations and the like). I can't get it to result in the proper results. Anyone mind checking it out and see what you can find please?