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

lcm should throw when one arg is infinite and the other is finite #56991

Open
LilithHafner opened this issue Jan 8, 2025 · 1 comment
Open
Labels
maths Mathematical functions minor change Marginal behavior change acceptable for a minor release rationals The Rational type and values thereof

Comments

@LilithHafner
Copy link
Member

LilithHafner commented Jan 8, 2025

julia> lcm(1//0, 3//2)
3//2 # Should throw

julia> lcm(1//0, 1//0)
1//0 # Correct

julia> lcm(0//1, 2//3)
0//1 # Correct

julia> lcm(1//0, -1//0)
1//0 # Correct

Originally posted by @LilithHafner as part of a comment from triage in #56423 (comment)

@LilithHafner LilithHafner added maths Mathematical functions rationals The Rational type and values thereof labels Jan 8, 2025
@LilithHafner
Copy link
Member Author

Should we also make gcd(1//0, 1//1) throw?

@LilithHafner LilithHafner added the minor change Marginal behavior change acceptable for a minor release label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maths Mathematical functions minor change Marginal behavior change acceptable for a minor release rationals The Rational type and values thereof
Projects
None yet
Development

No branches or pull requests

1 participant