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

fix dispatch constraint on arg on rationalize for AbstractIrrational #55872

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nsajko
Copy link
Contributor

@nsajko nsajko commented Sep 25, 2024

The type is the type parameter of Rational, so it should be <:Integer. All the other rationalize methods have the <:Integer constraint for that argument.

The type is the type parameter of `Rational`, so it should be
`<:Integer`. All the other `rationalize` methods have the `<:Integer`
constraint for that argument.
nsajko added a commit to nsajko/julia that referenced this pull request Sep 26, 2024
Other changes:
* replace `:total` with the less powerful `:foldable`
* add an `<:Integer` dispatch constraint on the `rationalize` method,
  closes JuliaLang#55872
* replace `Rational{<:Integer}` with just `Rational`, they're equal

Other issues, related to `BigFloat` precision, are still present in
irrationals.jl, to be fixed by followup PRs, including JuliaLang#55853.

Fixes JuliaLang#55874
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.

1 participant