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

Should false * 1//0 == 0//1? #57068

Open
LilithHafner opened this issue Jan 16, 2025 · 2 comments
Open

Should false * 1//0 == 0//1? #57068

LilithHafner opened this issue Jan 16, 2025 · 2 comments
Labels
design Design of APIs or of the language itself maths Mathematical functions

Comments

@LilithHafner
Copy link
Member

Right now false * 1//0 throws, while false * Inf == 0.0

@LilithHafner LilithHafner added design Design of APIs or of the language itself maths Mathematical functions labels Jan 16, 2025
@nhz2
Copy link
Contributor

nhz2 commented Jan 16, 2025

I think false * Inf should be NaN to match 0 * Inf.

julia> 0 * Inf
NaN

@nhz2
Copy link
Contributor

nhz2 commented Jan 17, 2025

Sorry, I missed that as a special case false is intentionally a strong zero in multiplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design of APIs or of the language itself maths Mathematical functions
Projects
None yet
Development

No branches or pull requests

2 participants