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

Make # abs tol compare over the complex numbers #38433

Merged
merged 1 commit into from
Aug 10, 2024

Conversation

vbraun
Copy link
Member

@vbraun vbraun commented Jul 27, 2024

For calculations over complex numbers that generate numeric noise, one tends to create small but non-zero imaginary parts. This PR updates the "# abs tol" tolerance setting to work over the complex numbers, as the "abs" suggests complex numbers. The real and imaginary parts are compared separately.

The ordinary "# tol" and "# rel tol" are left as is.

Fixes #36631

Copy link

github-actions bot commented Jul 27, 2024

Documentation preview for this PR (built with commit d06e94b; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 27, 2024

Test failure in sagemath-categories

Copy link
Member

@dimpase dimpase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vbraun
Copy link
Member Author

vbraun commented Aug 1, 2024

All checks passed and the github-actions bot removed the positive review tag? 🤷

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 1, 2024

All checks passed and the github-actions bot removed the positive review tag?

It does that on pushes. It has nothing to do with the checks.

For calculations over complex numbers that generate numeric noise, one
tends to create small but non-zero imaginary parts. This PR updates
the "# abs tol" tolerance setting to work over the complex numbers, as
the "abs" suggests complex numbers. The real and imaginary parts are
compared separately.

The ordinary "# tol" and "# rel tol" are left as is.

Fixes sagemath#36631
@vbraun vbraun force-pushed the gh-36631-abs-tol-on-complex-domain branch from d06e94b to 1cca0f6 Compare August 3, 2024 12:14
@vbraun
Copy link
Member Author

vbraun commented Aug 3, 2024

Merge conflict fixed

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 3, 2024
For calculations over complex numbers that generate numeric noise, one
tends to create small but non-zero imaginary parts. This PR updates the
"# abs tol" tolerance setting to work over the complex numbers, as the
"abs" suggests complex numbers. The real and imaginary parts are
compared separately.

The ordinary "# tol" and "# rel tol" are left as is.

Fixes sagemath#36631

URL: sagemath#38433
Reported by: Volker Braun
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 5, 2024
For calculations over complex numbers that generate numeric noise, one
tends to create small but non-zero imaginary parts. This PR updates the
"# abs tol" tolerance setting to work over the complex numbers, as the
"abs" suggests complex numbers. The real and imaginary parts are
compared separately.

The ordinary "# tol" and "# rel tol" are left as is.

Fixes sagemath#36631

URL: sagemath#38433
Reported by: Volker Braun
Reviewer(s): Dima Pasechnik
@vbraun vbraun merged commit a58fd63 into sagemath:develop Aug 10, 2024
7 of 13 checks passed
@mkoeppe mkoeppe added this to the sage-10.5 milestone Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

abs tol unable to handle non-real numerical noise
3 participants