Skip to content

Conversation

@AayushSabharwal
Copy link
Contributor

Close #177

This only handles the case for comparing two polynomials. The rest of the changes need to be made in MultivariatePolynomials.jl

test/comp.jl Outdated
@testset "Comparison with NaN" begin
@polyvar p
@test (NaN + p) != (NaN + p)
@test isequal(NaN + p, NaN + p)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also check that it's allocation-free ? Sometimes Julia decides to not specialize on function arguments so if you add q = NaN + p and then @test 0 == @allocated q != q and @test 0 == @allocated isequal(q, q), it should make sure of that

@AayushSabharwal
Copy link
Contributor Author

Bump here as well :D

Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@blegat blegat merged commit 632b2a6 into JuliaAlgebra:master Aug 14, 2025
3 of 4 checks passed
@AayushSabharwal AayushSabharwal deleted the as/fix-isequal branch August 14, 2025 14:43
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.

isequal gives incorrect results for NaN

2 participants