eloraiby / delaunay

Relatively Robust Divide and Conquer 2D Delaunay Construction Algorithm in $O(n \log n)$
GNU Affero General Public License v3.0
126 stars 34 forks source link

Assertation "floating point precision error" when compiled with -O1, -O2 or -O3 in 32 bit mode #3

Closed uranix closed 9 years ago

uranix commented 9 years ago

I'm getting

delaunay.c:690: del_valid_left: Assertion `v != u && "1: floating point precision error"' failed.

when using FAST_PREDICATE or EXACT_PREDICATE and

delaunay.c:754: del_valid_right: Assertion `du->pair' failed.

when using LOOSE_PREDICATE. Code was built with gcc (Debian 4.9.2-10) and -m32 switch with any of -O1, -O2, -O3.

Enabling SSE2 via -msse2 -mfpmath=sse seems to solve the problem. The failing test is here

eloraiby commented 9 years ago

thanks for the test case, I ll be checking on it ASAP!

eloraiby commented 9 years ago

removed float/double and defaulting to long double. Please test and confirm

uranix commented 9 years ago

Worked like a charm, thank you