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

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

lgoettgens
Copy link
Contributor

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
Contributor 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

@JeffreySarnoff JeffreySarnoff merged commit 3a4803f into JeffreySarnoff:main Sep 13, 2024
7 of 8 checks passed
@lgoettgens lgoettgens deleted the lg/promote branch September 13, 2024 21:16
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