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

Replace all methods of promote_type by promote_rule #70

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lgoettgens
Copy link

Resolves #67.

@JeffreySarnoff
Copy link
Owner

Please add two very simple tests to confirm this change has no unexpected result. (There have been "obvious, non-controversial and simple" PRs in other numerical repos which did.) Then I am delighted to merge, increment the version, and release your patch.

@lgoettgens
Copy link
Author

The comparison tests in

@test ArbFloat(2.0) > 1
@test ArbFloat(2.0) >= 1
@test 1 < ArbFloat(2.0)
@test 1 <= ArbFloat(2.0)
@test ArbFloat(2.0) > 1.0
@test 1.0 < ArbFloat(2.0)
@test ArbFloat(2.0) >= 1.0
@test 1.0 <= ArbFloat(2.0)
@test ArbFloat(2.0) == ArbFloat(2.0)
@test ArbFloat(1.0) != ArbFloat(2.0)
@test ArbFloat(2.0) > ArbFloat(1.0)
@test ArbFloat(1.0) < ArbFloat(2.0)
@test ArbFloat(2.0) >= ArbFloat(1.0)
@test ArbFloat(1.0) <= ArbFloat(2.0)
@test ArbFloat(2.0) == ArbReal(2.0)
@test ArbFloat(1.0) != ArbReal(2.0)
@test ArbFloat(2.0) > ArbReal(1.0)
@test ArbFloat(1.0) < ArbReal(2.0)
@test ArbFloat(2.0) >= ArbReal(1.0)
@test ArbFloat(1.0) <= ArbReal(2.0)
@test ArbReal(2.0) == ArbFloat(2.0)
@test ArbReal(1.0) != ArbFloat(2.0)
@test ArbReal(2.0) > ArbFloat(1.0)
@test ArbReal(1.0) < ArbFloat(2.0)
@test ArbReal(2.0) >= ArbFloat(1.0)
@test ArbReal(1.0) <= ArbFloat(2.0)
@test ArbReal(2.0) > 1
@test ArbReal(2.0) >= 1
@test 1 < ArbReal(2.0)
@test 1 <= ArbReal(2.0)
@test ArbReal(2.0) > 1.0
@test 1.0 < ArbReal(2.0)
@test ArbReal(2.0) >= 1.0
@test 1.0 <= ArbReal(2.0)
@test ArbReal(2.0) == ArbReal(2.0)
@test ArbReal(1.0) != ArbReal(2.0)
@test ArbReal(2.0) > ArbReal(1.0)
@test ArbReal(1.0) < ArbReal(2.0)
@test ArbReal(2.0) >= ArbReal(1.0)
@test ArbReal(1.0) <= ArbReal(2.0)
already do a great job in testing that comparisons still hold after promoting. Nevertheless, I added a few small tests that check the expected output type of some basic arithmetic operations. Is this what you had in mind?

@JeffreySarnoff
Copy link
Owner

JeffreySarnoff commented Jun 11, 2024 via email

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

Successfully merging this pull request may close these issues.

promote_type is not supposed to be overloaded
2 participants