+/* --- @ec_eq@ --- *
+ *
+ * Arguments: @const ec *p, *q@ = two points
+ *
+ * Returns: Nonzero if the points are equal. Compares external-format
+ * points.
+ */
+
+#define EC_EQ(p, q) \
+ ((EC_ATINF(p) && EC_ATINF(q)) || \
+ (!EC_ATINF(p) && !EC_ATINF(q) && \
+ MP_EQ((p)->x, (q)->x) && \
+ MP_EQ((p)->y, (q)->y)))
+
+extern int ec_eq(const ec *p, const ec *q);
+