This function only assumes that the points are on the curve
It handles corner cases around the infinity point causing some overhead compared to embedded_curve_add_not_nul and embedded_curve_add_unsafe
This function assumes that:
The points are on the curve, and
The points don't share an x-coordinate, and
Neither point is the infinity point.
If it is used with correct input, the function ensures the correct non-zero result is returned.
Except for points on the curve, the other assumptions are checked by the function. It will cause assertion failure if they are not respected.
Unsafe ec addition
If the inputs are the same, it will perform a doubling, but only if point1 and point2 are the same variable.
If they have the same value but are different variables, the result will be incorrect because in this case
it assumes (but does not check) that the points' x-coordinates are not equal.
It also assumes neither point is the infinity point.