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

Incorrect result for addition with widely-varying floating point numbers #14

Open
zomborid opened this issue Mar 8, 2020 · 6 comments · May be fixed by #19
Open

Incorrect result for addition with widely-varying floating point numbers #14

zomborid opened this issue Mar 8, 2020 · 6 comments · May be fixed by #19
Labels

Comments

@zomborid
Copy link
Contributor

zomborid commented Mar 8, 2020

The front page description states that the package is intended to be a rigorous computational method however the implementation does not reflect this in any shape or form.

See the result of the following statement:

Affine(-1..1) + Affine(1e23) + Affine(2020.0) - Affine(1e23)

Evaluates to: ⟨0.0; [1.0]⟩
The correct answer: ⟨2020.0; [1.0]⟩
Acceptable answer: affine set containing the result, but overestimating due to limits of floating point arithmetic.

This error is from numeric source, not a software bug. A way to address these kinds of problems and make the package a real rigorous implementation is interval arithmetic. (I saw traces of that, but overall no reliable computation is implemented.)

Until a rigorous implementation is presented, I would highly recommend removing the word rigorous from the description. Maybe stating explicitly, that the current implementation is prone to the everyday numerical errors.

@dpsanders
Copy link
Member

Thanks for the comment ; you are of course correct. I would be very happy if you could submit a pull request to remove the word rigorous, and mainly to help with the actual rigorous implementation! Note that I am the author of the IntervalArithmetic.jl package. Unfortunately the implementation of affine arithmetic was never finished.

@dpsanders
Copy link
Member

Is this still the case with PR #12?

@zomborid
Copy link
Contributor Author

zomborid commented Mar 8, 2020

With the renaming branch it works correctly.
If you plan to merge it to master in the near future, I wouldn't bother changing the current state.
Are there specific goals for PR #12 that are missing?

@dpsanders
Copy link
Member

Basically all the tests need to be rewritten into the new form.

@mforets mforets mentioned this issue Mar 8, 2020
zomborid added a commit to zomborid/AffineArithmetic.jl that referenced this issue Mar 9, 2020
Stating clearly that a rigorous implementation is not present yet. See issue JuliaIntervals#14.
dpsanders pushed a commit that referenced this issue Mar 9, 2020
* Update README.md

Stating clearly that a rigorous implementation is not present yet. See issue #14.

* Update README.md

Reword.
@zomborid zomborid closed this as completed Mar 9, 2020
@dpsanders dpsanders reopened this Mar 10, 2020
@dpsanders
Copy link
Member

The original issue is not yet fixed.

@dpsanders dpsanders changed the title On being rigorous Incorrect result for addition with widely-varying floating point numbers Mar 10, 2020
@dpsanders dpsanders added the bug label Mar 10, 2020
@dpsanders dpsanders linked a pull request Mar 10, 2020 that will close this issue
@dpsanders
Copy link
Member

Should be fixed by #19.

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

Successfully merging a pull request may close this issue.

2 participants