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 inf rational #39063

Merged
merged 2 commits into from
Jan 4, 2021
Merged

fix inf rational #39063

merged 2 commits into from
Jan 4, 2021

Conversation

matbesancon
Copy link
Contributor

This PR fixes inf addition with rational numbers, so that Inf + Inf == Inf and -Inf -Inf == -Inf, with appropriate promotions.
The behaviour that would yield a NaN in floating points remains unchanged and throws the DivideError

@matbesancon
Copy link
Contributor Author

I pulled the code of the -,+ method implementations out of the for loop, not sure if we should have a for op in :+, :-, visibility could decrease

@matbesancon matbesancon closed this Jan 2, 2021
@matbesancon matbesancon reopened this Jan 2, 2021
@matbesancon
Copy link
Contributor Author

Not sure if should close-reopen for the failing ones

@JeffBezanson JeffBezanson merged commit 1a333a9 into JuliaLang:master Jan 4, 2021
@matbesancon matbesancon deleted the ratio-inf branch January 4, 2021 23:46
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
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.

2 participants