Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler setup for exactpred.c #6

Open
urschrei opened this issue Jan 11, 2020 · 2 comments
Open

Compiler setup for exactpred.c #6

urschrei opened this issue Jan 11, 2020 · 2 comments

Comments

@urschrei
Copy link
Member

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.

@frewsxcv
Copy link
Member

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

@rmanoka
Copy link
Contributor

rmanoka commented Aug 18, 2020

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants