In general this is safe: B would not be evaluated only if A would be false,
that is, when the assertion would be raised anyway. So what worse can happen
in evaluating B than an assertion failure. Not much I guess.
And for Uncertain<> conditions, it is preferable to use & instead of &&.
So I change some of these to see if it might become a global rule.
(it was alrady the same type, but now the filtering code can be independent on Interval_nt_advanced
(think other interval types, or other types of filters).
- Use K::Bool_type, K::Orientation... instead of bool, CGAL::Orientation...
- More functions around Uncertain<> : make_certain(), extract_singleton(),
possible conversions tightenning.
Many conversions still remain, e.g. for switch and if statements, &&, ||...
However, it seems that this is the proper way to call it
This commit adds CGAL::in_zero for backward compatibility with other packages until the new name is decided.
Bigfoat_interval_traits currently derives from it.
General Inerval Functors (Upper,Lower,...) are moved to Interval_traits
Several Functors are added e.g. Median (names are compliant with boost::interval)
Functor adapting functions are available
TODO: define/test/name get_significant_bits ?log_relative_error?
- Add a runtime test that tries to check if a user has forgotten -frounding-math.
- Make the code "more robust" (big quotes) against no-rounding-math compiler optimizations
by systematically negating the second argument of CGAL_IA_MUL() and CGAL_IA_DIV()
instead of the first, since it is the one which stops constant propagation
(at least this way the test-suite passes even with -fno-rounding-math).
This way -CGAL_IA_MUL(-a,b) which got wrongly optimized to CGAL_IA_MUL(a,b),
doesn't anymore when in the form -CGAL_IA_MUL(a, -b).
It is not bullet proof, as negations can come from further away.
-frounding-math is still necessary.
Getting rid of it would require more places where to call CGAL::IA_force_to_double(),
and would be necessarily much slower.