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

Tests error on [email protected] #25

Closed
DanielVandH opened this issue Feb 5, 2024 · 4 comments
Closed

Tests error on [email protected] #25

DanielVandH opened this issue Feb 5, 2024 · 4 comments

Comments

@DanielVandH
Copy link
Contributor

DanielVandH commented Feb 5, 2024

As of [email protected], the following errors (taken from the tests)

julia> a = (2.0, 0.0)
(2.0, 0.0)

julia> b = (1.0, 1.0)
(1.0, 1.0)

julia> c = (1.0, -1.0)
(1.0, -1.0)

julia> d = (nextfloat(0.0), 0.0)
(5.0e-324, 0.0)

julia> incircle(a, b, c, d)
ERROR: ArgumentError: `==` is only supported between thin intervals and numbers
Stacktrace:
 [1] ==
   @ C:\Users\User\.julia\packages\IntervalArithmetic\rX8mD\src\intervals\real_interface.jl:149 [inlined]
 [2] ==(x::IntervalArithmetic.Interval{Float64}, y::Int64)
   @ IntervalArithmetic C:\Users\User\.julia\packages\IntervalArithmetic\rX8mD\src\intervals\real_interface.jl:155
 [3] incircle_slow(p::Tuple{Float64, Float64}, q::Tuple{Float64, Float64}, r::Tuple{Float64, Float64}, a::Tuple{Float64, Float64})
   @ ExactPredicates C:\Users\User\.julia\dev\ExactPredicates.jl-1\src\Codegen.jl:340
 [4] incircle(p::Tuple{Float64, Float64}, q::Tuple{Float64, Float64}, r::Tuple{Float64, Float64}, a::Tuple{Float64, Float64})
   @ ExactPredicates C:\Users\User\.julia\dev\ExactPredicates.jl-1\src\Codegen.jl:470
 [5] top-level scope
   @ c:\Users\User\.julia\dev\ExactPredicates.jl-1\test\runtests.jl:57

No error on v0.22.5. I'm not sure I understand what the issue is looking at incircle_slow (or if this is actually an IntervalArithmetic issue rather than an ExactPredicates issue. maybe @OlivierHnt knows since they updated #24 previously?).

@lairez lairez closed this as completed in a9dce03 Feb 5, 2024
@lairez
Copy link
Owner

lairez commented Feb 5, 2024

JuliaIntervals/IntervalArithmetic.jl#613 introduced a breaking change, so things break...

@OlivierHnt
Copy link
Contributor

That's the culprit. I can revert it, it should not have been breaking. I was being too presumptuous.

But I am not sure I understand this error

elseif mag($ivres) == 0

seems ok to me, since mag returns a Float64, not an interval.

@OlivierHnt
Copy link
Contributor

OlivierHnt commented Feb 5, 2024

Ah I see you just changed it, it was $ivres == 0 before. Btw you could also have done isthinzero($ivres).

@lairez
Copy link
Owner

lairez commented Feb 5, 2024

No worries, it happens all the time

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

No branches or pull requests

3 participants