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

/alternatives endpoint gives incorrect response for sqrt(x*x) #1058

Open
elmisback opened this issue Nov 17, 2024 · 1 comment
Open

/alternatives endpoint gives incorrect response for sqrt(x*x) #1058

elmisback opened this issue Nov 17, 2024 · 1 comment

Comments

@elmisback
Copy link
Collaborator

Odyssey obtains x (not |x|) as a rewriting for sqrt(x*x). I confirmed that this is what comes back from the /alternatives call. I can obtain this for any input range, and the accuracy is correctly given as 1.6%. Surprisingly, the Herbie demo doesn't suffer from this problem: https://herbie.uwplse.org/demo/2d0618bf426ea87944ccd749e3bbdec293310a98.1a83c9f5186db102b678a2d5f869f99992469071/graph.html

I'm not sure why only the alternatives endpoint would have this problem.

Related Odyssey issue reported by a user from SC: herbie-fp/odyssey#220

@zaneenders zaneenders self-assigned this Nov 18, 2024
@zaneenders
Copy link
Collaborator

I started working on this current status is explained in this PR.
Not sure what the fix should be, but I think it will involve changes to both Odyssey and Herbie.

@zaneenders zaneenders removed their assignment Dec 13, 2024
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

2 participants