-
Notifications
You must be signed in to change notification settings - Fork 197
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
Inlining a clause changes the result #1732
Comments
I have another simpler example:
If I run the above program, I get:
If I now modify the
I get:
|
This is a consequence of working with floating numbers and transforming floating-point numbers algebraically using The problem is that we don't have an epsilon check for set membership, e.g., |
I think the problem is slightly different, and I would propose a simple fix (but before implementing, want to check you're ok with this): At the point of the insert (when generating the insertion tuple), if we are dealing with a float, effectively do the following:
By the way, here's a much shorter version which illustrates the problem without using
The first relation just memoizes the results, so you get both positive and negative zeros. The second uses arithmetic and since IEEE requires +-0 to be treated equally, you get just one. Hope that makes sense. PS: An alternative solution would be to port all of the floating point code to unum's. (j/k) |
Hi guys,
Consider the following program.
If I now inline
CnAF
,-0
is added in the result.Souffle revision I am using: fbb4c4b
The text was updated successfully, but these errors were encountered: