robust icon indicating copy to clipboard operation
robust copied to clipboard

Compiler setup for exactpred.c

Open urschrei opened this issue 5 years ago • 2 comments

From @hugoledoux's comment: Regarding incorrect results when input is as follows:

p_a: (x: -0.0000000000000000033732417326292235, y: -710.1201610753293)
p_b: (x: -0.0000000000000006803180046827075, y: 0.0000000000000007474653075557756) 
p_c: (x: -5921927286181025000000000, y: -70060321899175880000000000000)
predicates.c orient2d: 0
exactpred.rs orient2d: 4205279958339305000000000000

the answer from predicates.c is certainly completely wrong. It returns 0 and that would mean the 3 points are collinear, and they are clearly not. The 3 points abc, in that order, have a CCW orientation, which should be positive, which is what exactpred.rs returns. Either predicates.c is wrong (which I doubt), or you didn't setup correctly the constant for your compiler, see details here.

urschrei avatar Jan 11 '20 18:01 urschrei

For reference, this is the library that I used to compile and run exactpred.c: https://github.com/andersforsgren/robust2d

frewsxcv avatar Jan 18 '20 20:01 frewsxcv

I tried using the predicates.c from Prof. Shewchuk's page, and for the above input, it gives: 4205279958339305235667746816.000000. I think exactpred.rs may be quite right !

rmanoka avatar Aug 18 '20 19:08 rmanoka