Skip to content

Commit

Permalink
Merge pull request #11 from ArrogantGao/fix_andor
Browse files Browse the repository at this point in the history
fix the isapprox for TropicalAndOr
  • Loading branch information
GiggleLiu authored Sep 26, 2023
2 parents 90d96ae + f599ca0 commit 1b23f8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/tropical_andor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ Base.one(::TropicalAndOr) = one(TropicalAndOr)
Base.inv(x::TropicalAndOr) = TropicalAndOr(!x.n)

# bool type only have two values
Base.isapprox(x::TropicalAndOr, y::TropicalAndOr; kwargs...) = ispprox(x.n, y.n; kwargs...)
Base.isapprox(x::TropicalAndOr, y::TropicalAndOr; kwargs...) = isapprox(x.n, y.n; kwargs...)
1 change: 1 addition & 0 deletions test/tropical_andor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ using TropicalNumbers

@test zero(TropicalAndOr) == TropicalAndOr(false)
@test one(TropicalAndOr) == TropicalAndOr(true)
@test zero(TropicalAndOr) TropicalAndOr(false)

println(TropicalAndOr(true))
end

0 comments on commit 1b23f8c

Please sign in to comment.