diff --git a/qpms/pointgroups.c b/qpms/pointgroups.c index 063768b..4daed5e 100644 --- a/qpms/pointgroups.c +++ b/qpms/pointgroups.c @@ -7,7 +7,9 @@ if ((a) > (b)) return 1;\ } +// THIS IS NUMERICALLY UNSTABLE! FIXME!!!!!! int qpms_pg_irot3_cmp(const qpms_irot3_t *p1, const qpms_irot3_t *p2) { + QPMS_WARN("NUMERICALLY UNSTABLE! DON'T USE ME!") PAIRCMP(p1->det, p2->det); const qpms_quat_t r1 = qpms_quat_standardise(p1->rot), r2 = qpms_quat_standardise(p2->rot); PAIRCMP(creal(r1.a), creal(r2.a)); diff --git a/qpms/quaternions.h b/qpms/quaternions.h index fb1e282..a1e93dd 100644 --- a/qpms/quaternions.h +++ b/qpms/quaternions.h @@ -99,6 +99,8 @@ static inline bool qpms_quat_isclose(const qpms_quat_t p, const qpms_quat_t q, d /// "Standardises" a quaternion to have the largest component "positive". /** + * FIXME + * NUMERICALLY UNSTABLE. DON'T USE * This is to remove the ambiguity stemming from the double cover of SO(3). */ static inline qpms_quat_t qpms_quat_standardise(qpms_quat_t p) {