For the performance concerns I am using exact predicates inexact constructions to compute and compare my distance-based operations. However, if the result causes inaccuracy, I want to repeat the same operations by using exact predicates exact constructions. How can I understand there occurred an inaccurate operation? Does CGAL::Precondition_exception work? For instance I plan to the followings in a try block:
- Compute the point-plane distance by using
CGAL::squared_distance()method with inexact constructions - Compare the resulting
CGAL::Lazy_exact_nt<boost::multiprecision::mpq_rational>values Then if there is thrown aCGAL::Precondition_exceptionexception, I want to repeat the same steps with exact constructions.
Is this a healthy/robust approach?