From 338eed945a6887a7d31643796f59ce4e986f04bf Mon Sep 17 00:00:00 2001 From: OlivierHnt <38465572+OlivierHnt@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:37:01 +0200 Subject: [PATCH] Change "weakly" to "weak" in function names --- src/IntervalArithmetic.jl | 4 +- src/decorations/functions.jl | 6 +- src/decorations/intervals.jl | 2 +- src/intervals/arithmetic/trigonometric.jl | 2 +- src/intervals/interval_operations/boolean.jl | 16 +- src/intervals/real_interface.jl | 6 +- test/interval_tests/consistency.jl | 24 +- test/interval_tests/construction.jl | 12 +- test/interval_tests/hyperbolic.jl | 70 +++--- test/interval_tests/non_BigFloat.jl | 2 +- test/interval_tests/numeric.jl | 30 +-- test/interval_tests/power.jl | 48 ++-- test/interval_tests/trig.jl | 122 +++++----- test/test_ITF1788/c-xsc.jl | 54 ++--- test/test_ITF1788/libieeep1788_bool.jl | 224 +++++++++---------- 15 files changed, 311 insertions(+), 311 deletions(-) diff --git a/src/IntervalArithmetic.jl b/src/IntervalArithmetic.jl index 79cd06fcf..21d4beae8 100644 --- a/src/IntervalArithmetic.jl +++ b/src/IntervalArithmetic.jl @@ -31,10 +31,10 @@ export Interval, interval, ±, @I_str, diam, radius, mid, midradius, scaled_mid, mag, mig, hull, emptyinterval, isemptyinterval, isinterior, - ismember, intersectinterval, isweaklysubset, isweaklysupset, isdisjointinterval, + ismember, intersectinterval, isweaksubset, isweaksupset, isdisjointinterval, setdiffinterval, precedes, strictprecedes, isstrictsubset, isstrictsupset, contains_zero, isthinzero, - isweaklyless, isstrictless, overlap, Overlap, + isweakless, isstrictless, overlap, Overlap, isequalinterval, entireinterval, isentireinterval, nai, isnai, isthin, iscommon, isatomic, inf, sup, bounds, bisect, mince, diff --git a/src/decorations/functions.jl b/src/decorations/functions.jl index ca8932870..9d51b4a86 100644 --- a/src/decorations/functions.jl +++ b/src/decorations/functions.jl @@ -20,8 +20,8 @@ const bool_functions = ( ) const bool_binary_functions = ( - :isweaklysubset, :isweaklysupset, :isstrictsubset, :isstrictsupset, - :isinterior, :isdisjointinterval, :precedes, :strictprecedes, :isstrictless, :isweaklyless, + :isweaksubset, :isweaksupset, :isstrictsubset, :isstrictsupset, + :isinterior, :isdisjointinterval, :precedes, :strictprecedes, :isstrictless, :isweakless, :isequalinterval, :overlap ) @@ -350,7 +350,7 @@ for (f, domain) in restricted_functions2 x = interval(xx) r = $(f)(x) d = min(decoration(xx), decoration(r)) - isweaklysubset(x, $domain) && return DecoratedInterval(r, d) + isweaksubset(x, $domain) && return DecoratedInterval(r, d) DecoratedInterval(r, trv) end end diff --git a/src/decorations/intervals.jl b/src/decorations/intervals.jl index aa3bacd95..c11533bfd 100644 --- a/src/decorations/intervals.jl +++ b/src/decorations/intervals.jl @@ -14,7 +14,7 @@ follows Section 11.2 of the IEEE Standard 1788-2015: - `ill -> 0`: not an interval (ill-formed) """ @enum DECORATION ill=0 trv=1 def=2 dac=3 com=4 -# Note that `isweaklyless`, and hence `<` and `min`, are automatically defined for enums +# Note that `isweakless`, and hence `<` and `min`, are automatically defined for enums """ DecoratedInterval{T<:NumTypes} diff --git a/src/intervals/arithmetic/trigonometric.jl b/src/intervals/arithmetic/trigonometric.jl index e32dc0c33..3afefd232 100644 --- a/src/intervals/arithmetic/trigonometric.jl +++ b/src/intervals/arithmetic/trigonometric.jl @@ -253,7 +253,7 @@ function tan(a::Interval{T}) where {T<:NumTypes} if iszero(lo_quadrant_mod) && hi_quadrant_mod == 1 # check if really contains singularity: - if isweaklysubset(hi_quadrant * half_pi(T), a) + if isweaksubset(hi_quadrant * half_pi(T), a) return entireinterval(T) # crosses singularity end diff --git a/src/intervals/interval_operations/boolean.jl b/src/intervals/interval_operations/boolean.jl index dcbfa5328..3738ecbfc 100644 --- a/src/intervals/interval_operations/boolean.jl +++ b/src/intervals/interval_operations/boolean.jl @@ -37,20 +37,20 @@ Check if the interval `a` contains exactly (and only) the number `x`. isequalinterval(a::Interval, x::Real) = inf(a) == sup(a) == x """ - isweaklysubset(a, b) + isweaksubset(a, b) Checks if all the points of the interval `a` are within the interval `b`. Typed with \\subseteq. -Implement the `isweaklysubset` function of the IEEE Standard 1788-2015 (Table 9.3). +Implement the `isweaksubset` function of the IEEE Standard 1788-2015 (Table 9.3). """ -function isweaklysubset(a::Interval, b::Interval) +function isweaksubset(a::Interval, b::Interval) isemptyinterval(a) && return true return inf(b) ≤ inf(a) && sup(a) ≤ sup(b) end -isweaklysupset(a::Interval, b::Interval) = isweaklysubset(b, a) +isweaksupset(a::Interval, b::Interval) = isweaksubset(b, a) """ isstrictsubset(a, b) @@ -59,13 +59,13 @@ Checks if `a` is a strict subset of interval `b`. """ function isstrictsubset(a::Interval, b::Interval) isequalinterval(a, b) && return false - return isweaklysubset(a, b) + return isweaksubset(a, b) end isstrictsupset(a::Interval, b::Interval) = isstrictsubset(b, a) """ - isweaklyless(a, b) + isweakless(a, b) Checks if the interval `a` is weakly less than interval `b`. @@ -74,7 +74,7 @@ any element of `b`. Implement the `less` function of the IEEE Standard 1788-2015 (Table 10.3). """ -function isweaklyless(a::Interval, b::Interval) +function isweakless(a::Interval, b::Interval) isemptyinterval(a) && isemptyinterval(b) && return true (isemptyinterval(a) || isemptyinterval(b)) && return false return (inf(a) ≤ inf(b)) && (sup(a) ≤ sup(b)) @@ -164,7 +164,7 @@ function ismember(x::Real, a::Interval) end ismember(::Interval, ::Interval) = - throw(ArgumentError("`ismember` is purposely not supported for two interval arguments. See instead `isweaklysubset`.")) + throw(ArgumentError("`ismember` is purposely not supported for two interval arguments. See instead `isweaksubset`.")) ismember(x::Real, a::Complex{<:Interval}) = ismember(x, real(a)) && ismember(0, imag(a)) ismember(x::Complex, a::Complex{<:Interval}) = ismember(real(x), real(a)) && ismember(imag(x), imag(a)) diff --git a/src/intervals/real_interface.jl b/src/intervals/real_interface.jl index 802ba197b..32f4d26ac 100644 --- a/src/intervals/real_interface.jl +++ b/src/intervals/real_interface.jl @@ -64,14 +64,14 @@ dist(a::Interval, b::Interval) = max(abs(inf(a)-inf(b)), abs(sup(a)-sup(b))) Base.:(==)(::Interval, ::Interval) = # also returned when calling `≤`, `≥`, `isequal` throw(ArgumentError("`==` is purposely not supported for intervals. See instead `isequalinterval`.")) -Base.:<(::Interval, ::Interval) = # also returned when calling `>` - throw(ArgumentError("`<` is purposely not supported for intervals. See instead `isweaklyless`, `precedes`.")) +Base.:<(::Interval, ::Interval) = # also returned when calling `isless`, `>` + throw(ArgumentError("`<` is purposely not supported for intervals. See instead `isstrictless`, `strictprecedes`.")) Base.isdisjoint(::Interval, ::Interval) = throw(ArgumentError("`isdisjoint` is purposely not supported for intervals. See instead `isdisjointinterval`.")) Base.issubset(::Interval, ::Interval) = - throw(ArgumentError("`issubset` is purposely not supported for intervals. See instead `isweaklysubset`.")) + throw(ArgumentError("`issubset` is purposely not supported for intervals. See instead `isweaksubset`.")) Base.in(::Interval, ::Interval) = throw(ArgumentError("`in` is purposely not supported for intervals. See instead `ismember`.")) diff --git a/test/interval_tests/consistency.jl b/test/interval_tests/consistency.jl index 041016d94..d91184fcd 100644 --- a/test/interval_tests/consistency.jl +++ b/test/interval_tests/consistency.jl @@ -77,9 +77,9 @@ import IntervalArithmetic: unsafe_interval end @testset "Inclusion tests" begin - @test isweaklysubset(b, c) - @test isweaklysubset(emptyinterval(c), c) - @test !isweaklysubset(c, emptyinterval(c)) + @test isweaksubset(b, c) + @test isweaksubset(emptyinterval(c), c) + @test !isweaksubset(c, emptyinterval(c)) @test isinterior(b,c) @test !isinterior(b, emptyinterval(b)) @test isinterior(emptyinterval(c), c) @@ -92,10 +92,10 @@ import IntervalArithmetic: unsafe_interval @test !isstrictsupset(b, b) @test !isstrictsupset(emptyinterval(c), c) @test isstrictsupset(c, emptyinterval(c)) - @test isweaklysupset(c, b) - @test isweaklysupset(b, b) - @test !isweaklysupset(emptyinterval(c), c) - @test isweaklysupset(c, emptyinterval(c)) + @test isweaksupset(c, b) + @test isweaksupset(b, b) + @test !isweaksupset(emptyinterval(c), c) + @test isweaksupset(c, emptyinterval(c)) @test isdisjointinterval(a, I"2.1") @test !(isdisjointinterval(a, b)) @test isdisjointinterval(emptyinterval(a), a) @@ -103,9 +103,9 @@ import IntervalArithmetic: unsafe_interval end @testset "Comparison tests" begin - @test isweaklyless(emptyinterval(), emptyinterval()) - @test !isweaklyless(interval(1, 2), emptyinterval()) - @test isweaklyless(interval(-Inf,Inf), interval(-Inf,Inf)) + @test isweakless(emptyinterval(), emptyinterval()) + @test !isweakless(interval(1, 2), emptyinterval()) + @test isweakless(interval(-Inf,Inf), interval(-Inf,Inf)) @test precedes(emptyinterval(), emptyinterval()) @test precedes(interval(3, 4), emptyinterval()) @test !(precedes(interval(0, 2),interval(-Inf,Inf))) @@ -228,7 +228,7 @@ import IntervalArithmetic: unsafe_interval @test isequalinterval(cancelplus(x, y), entireinterval(BigFloat)) x = interval(-big(1.0), eps(big(1.0))/2) y = interval(-eps(big(1.0))/2, big(1.0)) - @test isweaklysubset(cancelminus(x, y), interval(-one(BigFloat), one(BigFloat))) + @test isweaksubset(cancelminus(x, y), interval(-one(BigFloat), one(BigFloat))) @test isequalinterval(cancelplus(x, y), interval(zero(BigFloat), zero(BigFloat))) @test isequalinterval(cancelminus(emptyinterval(), emptyinterval()), emptyinterval()) @test isequalinterval(cancelplus(emptyinterval(), emptyinterval()), emptyinterval()) @@ -288,7 +288,7 @@ import IntervalArithmetic: unsafe_interval @test isequalinterval(sign(interval(-3.0,-1.0)), interval(-1.0, -1.0)) # Test putting functions in interval: - @test isweaklysubset(log(interval(-2, 5)), interval(-Inf, log(interval(5)))) + @test isweaksubset(log(interval(-2, 5)), interval(-Inf, log(interval(5)))) end # @testset "Interval rounding tests" begin diff --git a/test/interval_tests/construction.jl b/test/interval_tests/construction.jl index 82e39803f..529ccf688 100644 --- a/test/interval_tests/construction.jl +++ b/test/interval_tests/construction.jl @@ -84,20 +84,20 @@ import IntervalArithmetic: unsafe_interval a = I"[0.1, 0.2]" b = interval(0.1, 0.2) - @test isweaklysubset(b, a) + @test isweaksubset(b, a) # TODO Actually use the rounding mode here for rounding in (:wide, :narrow) a = interval(0.1, 0.2) - @test isweaklysubset(a, interval(0.09999999999999999, 0.20000000000000004)) + @test isweaksubset(a, interval(0.09999999999999999, 0.20000000000000004)) b = interval(0.1) - @test isweaklysubset(b, interval(0.09999999999999999, 0.10000000000000002)) - @test isweaklysubset(b, interval(0.09999999999999999, 0.20000000000000004)) - @test isweaklysubset(float(b), a) + @test isweaksubset(b, interval(0.09999999999999999, 0.10000000000000002)) + @test isweaksubset(b, interval(0.09999999999999999, 0.20000000000000004)) + @test isweaksubset(float(b), a) c = I"[0.1, 0.2]" - @test isweaklysubset(a, c) # a is narrower than c + @test isweaksubset(a, c) # a is narrower than c @test isequalinterval(interval(1//2), interval(0.5)) @test interval(1//10).lo == rationalize(0.1) end diff --git a/test/interval_tests/hyperbolic.jl b/test/interval_tests/hyperbolic.jl index 4c392544b..e9670c0b4 100644 --- a/test/interval_tests/hyperbolic.jl +++ b/test/interval_tests/hyperbolic.jl @@ -6,14 +6,14 @@ using Test @test isequalinterval(sinh(interval(0.5)), interval(0.5210953054937473, 0.5210953054937474)) @test isequalinterval(sinh(interval(0.5, 1.67)), interval(0.5210953054937473, 2.5619603657712102)) @test isequalinterval(sinh(interval(-4.5, 0.1)), interval(-45.00301115199179, 0.10016675001984404)) - @test isweaklysubset(sinh(interval(BigFloat, 0.5, 0.5)), sinh(interval(0.5))) + @test isweaksubset(sinh(interval(BigFloat, 0.5, 0.5)), sinh(interval(0.5))) - @test isweaklysubset(sinh(interval(BigFloat, 0.5, 1.67)), sinh(interval(0.5, 1.67))) - @test isweaklysubset(sinh(interval(BigFloat, 1.67, 3.2)), sinh(interval(1.67, 3.2))) - @test isweaklysubset(sinh(interval(BigFloat, 2.1, 5.6)), sinh(interval(2.1, 5.6))) - @test isweaklysubset(sinh(interval(BigFloat, 0.5, 8.5)), sinh(interval(0.5, 8.5))) - @test isweaklysubset(sinh(interval(BigFloat, -4.5, 0.1)), sinh(interval(-4.5, 0.1))) - @test isweaklysubset(sinh(interval(BigFloat, 1.3, 6.3)), sinh(interval(1.3, 6.3))) + @test isweaksubset(sinh(interval(BigFloat, 0.5, 1.67)), sinh(interval(0.5, 1.67))) + @test isweaksubset(sinh(interval(BigFloat, 1.67, 3.2)), sinh(interval(1.67, 3.2))) + @test isweaksubset(sinh(interval(BigFloat, 2.1, 5.6)), sinh(interval(2.1, 5.6))) + @test isweaksubset(sinh(interval(BigFloat, 0.5, 8.5)), sinh(interval(0.5, 8.5))) + @test isweaksubset(sinh(interval(BigFloat, -4.5, 0.1)), sinh(interval(-4.5, 0.1))) + @test isweaksubset(sinh(interval(BigFloat, 1.3, 6.3)), sinh(interval(1.3, 6.3))) end @testset "cosh" begin @@ -22,13 +22,13 @@ end @test isequalinterval(cosh(interval(0.5, 1.67)), interval(1.1276259652063807, 2.750207431409957)) @test isequalinterval(cosh(interval(-4.5, 0.1)), interval(1.0, 45.01412014853003)) - @test isweaklysubset(cosh(interval(BigFloat, 0.5, 0.5)), cosh(interval(0.5))) - @test isweaklysubset(cosh(interval(BigFloat, 0.5, 1.67)), cosh(interval(0.5, 1.67))) - @test isweaklysubset(cosh(interval(BigFloat, 1.67, 3.2)), cosh(interval(1.67, 3.2))) - @test isweaklysubset(cosh(interval(BigFloat, 2.1, 5.6)), cosh(interval(2.1, 5.6))) - @test isweaklysubset(cosh(interval(BigFloat, 0.5, 8.5)), cosh(interval(0.5, 8.5))) - @test isweaklysubset(cosh(interval(BigFloat, -4.5, 0.1)), cosh(interval(-4.5, 0.1))) - @test isweaklysubset(cosh(interval(BigFloat, 1.3, 6.3)), cosh(interval(1.3, 6.3))) + @test isweaksubset(cosh(interval(BigFloat, 0.5, 0.5)), cosh(interval(0.5))) + @test isweaksubset(cosh(interval(BigFloat, 0.5, 1.67)), cosh(interval(0.5, 1.67))) + @test isweaksubset(cosh(interval(BigFloat, 1.67, 3.2)), cosh(interval(1.67, 3.2))) + @test isweaksubset(cosh(interval(BigFloat, 2.1, 5.6)), cosh(interval(2.1, 5.6))) + @test isweaksubset(cosh(interval(BigFloat, 0.5, 8.5)), cosh(interval(0.5, 8.5))) + @test isweaksubset(cosh(interval(BigFloat, -4.5, 0.1)), cosh(interval(-4.5, 0.1))) + @test isweaksubset(cosh(interval(BigFloat, 1.3, 6.3)), cosh(interval(1.3, 6.3))) end @testset "tanh" begin @@ -37,37 +37,37 @@ end @test isequalinterval(tanh(interval(0.5, 1.67)), interval(0.46211715726000974, 0.9315516846152083)) @test isequalinterval(tanh(interval(-4.5, 0.1)), interval(-0.9997532108480276, 0.09966799462495583)) - @test isweaklysubset(tanh(interval(BigFloat, 0.5, 0.5)), tanh(interval(0.5))) - @test isweaklysubset(tanh(interval(BigFloat, 0.5, 1.67)), tanh(interval(0.5, 1.67))) - @test isweaklysubset(tanh(interval(BigFloat, 1.67, 3.2)), tanh(interval(1.67, 3.2))) - @test isweaklysubset(tanh(interval(BigFloat, 2.1, 5.6)), tanh(interval(2.1, 5.6))) - @test isweaklysubset(tanh(interval(BigFloat, 0.5, 8.5)), tanh(interval(0.5, 8.5))) - @test isweaklysubset(tanh(interval(BigFloat, -4.5, 0.1)), tanh(interval(-4.5, 0.1))) - @test isweaklysubset(tanh(interval(BigFloat, 1.3, 6.3)), tanh(interval(1.3, 6.3))) + @test isweaksubset(tanh(interval(BigFloat, 0.5, 0.5)), tanh(interval(0.5))) + @test isweaksubset(tanh(interval(BigFloat, 0.5, 1.67)), tanh(interval(0.5, 1.67))) + @test isweaksubset(tanh(interval(BigFloat, 1.67, 3.2)), tanh(interval(1.67, 3.2))) + @test isweaksubset(tanh(interval(BigFloat, 2.1, 5.6)), tanh(interval(2.1, 5.6))) + @test isweaksubset(tanh(interval(BigFloat, 0.5, 8.5)), tanh(interval(0.5, 8.5))) + @test isweaksubset(tanh(interval(BigFloat, -4.5, 0.1)), tanh(interval(-4.5, 0.1))) + @test isweaksubset(tanh(interval(BigFloat, 1.3, 6.3)), tanh(interval(1.3, 6.3))) - @test isweaklysubset(tanh(interval(-4.5, 0.1)), tanh(interval(Float32, -4.5, 0.1))) - @test isweaklysubset(tanh(interval(1.3, 6.3)), tanh(interval(Float32, 1.3, 6.3))) + @test isweaksubset(tanh(interval(-4.5, 0.1)), tanh(interval(Float32, -4.5, 0.1))) + @test isweaksubset(tanh(interval(1.3, 6.3)), tanh(interval(Float32, 1.3, 6.3))) for a in [ interval(17, 19), interval(0.5, 1.2) ] - @test isweaklysubset(tanh(a), sinh(a)/cosh(a)) + @test isweaksubset(tanh(a), sinh(a)/cosh(a)) end end # TODO For reason unkown these tests fail when put in the previous testset @testset "tanh with Float32" begin - @test isweaklysubset(tanh(interval(0.5)), tanh(interval(Float32, 0.5, 0.5))) - @test isweaklysubset(tanh(interval(0.5, 1.67)), tanh(interval(Float32, 0.5, 1.67))) - @test isweaklysubset(tanh(interval(1.67, 3.2)), tanh(interval(Float32, 1.67, 3.2))) - @test isweaklysubset(tanh(interval(2.1, 5.6)), tanh(interval(Float32, 2.1, 5.6))) - @test isweaklysubset(tanh(interval(0.5, 8.5)), tanh(interval(Float32, 0.5, 8.5))) + @test isweaksubset(tanh(interval(0.5)), tanh(interval(Float32, 0.5, 0.5))) + @test isweaksubset(tanh(interval(0.5, 1.67)), tanh(interval(Float32, 0.5, 1.67))) + @test isweaksubset(tanh(interval(1.67, 3.2)), tanh(interval(Float32, 1.67, 3.2))) + @test isweaksubset(tanh(interval(2.1, 5.6)), tanh(interval(Float32, 2.1, 5.6))) + @test isweaksubset(tanh(interval(0.5, 8.5)), tanh(interval(Float32, 0.5, 8.5))) end @testset "inverse" begin - @test isweaklysubset(asinh(interval(BigFloat, 1, 1)), asinh(interval(1))) - @test isweaklysubset(asinh(interval(BigFloat, 0.9, 2)), asinh(interval(0.9, 2))) - @test isweaklysubset(asinh(interval(BigFloat, 3, 4)), asinh(interval(3, 4))) + @test isweaksubset(asinh(interval(BigFloat, 1, 1)), asinh(interval(1))) + @test isweaksubset(asinh(interval(BigFloat, 0.9, 2)), asinh(interval(0.9, 2))) + @test isweaksubset(asinh(interval(BigFloat, 3, 4)), asinh(interval(3, 4))) - @test isweaklysubset(acosh(interval(BigFloat, 1, 1)), acosh(interval(1))) - @test isweaklysubset(acosh(interval(BigFloat, -2, -0.9)), acosh(interval(-2, -0.9))) - @test isweaklysubset(acosh(interval(BigFloat, 3, 4)), acosh(interval(3, 4))) + @test isweaksubset(acosh(interval(BigFloat, 1, 1)), acosh(interval(1))) + @test isweaksubset(acosh(interval(BigFloat, -2, -0.9)), acosh(interval(-2, -0.9))) + @test isweaksubset(acosh(interval(BigFloat, 3, 4)), acosh(interval(3, 4))) end diff --git a/test/interval_tests/non_BigFloat.jl b/test/interval_tests/non_BigFloat.jl index b247ae8e6..35386a8da 100644 --- a/test/interval_tests/non_BigFloat.jl +++ b/test/interval_tests/non_BigFloat.jl @@ -24,7 +24,7 @@ end c = I"[0.1, 0.2]" @test isa(I"0.1", Interval) - @test isweaklysubset(c, interval(prevfloat(0.1), nextfloat(0.2))) + @test isweaksubset(c, interval(prevfloat(0.1), nextfloat(0.2))) @test isequalinterval(interval(Float64, pi), interval(3.141592653589793, 3.1415926535897936)) end diff --git a/test/interval_tests/numeric.jl b/test/interval_tests/numeric.jl index c0bb1ca9d..4388a3f77 100644 --- a/test/interval_tests/numeric.jl +++ b/test/interval_tests/numeric.jl @@ -142,7 +142,7 @@ end @test dist(interval(1,27)^interval(1/3), interval(1., 3.)) < 2*eps(interval(1,3)).lo @test dist(interval(1,27)^(1/3), interval(1., 3.)) < 2*eps(interval(1,3)).lo - @test isweaklysubset(interval(1., 3.), interval(1,27)^(1//3)) + @test isweaksubset(interval(1., 3.), interval(1,27)^(1//3)) @test isequalinterval(interval(0.1,0.7)^(1//3), interval(0.46415888336127786, 0.8879040017426008)) @test dist(interval(0.1,0.7)^(1/3), interval(0.46415888336127786, 0.8879040017426008)) < 2*eps(interval(0.1,0.7)^(1/3)).lo @@ -159,24 +159,24 @@ end end @testset "Exp and log tests" begin - @test isweaklysubset(exp(interval(BigFloat, 1//2)), exp(interval(1//2))) + @test isweaksubset(exp(interval(BigFloat, 1//2)), exp(interval(1//2))) @test ismember(exp(big(1//2)), exp(interval(1//2))) - @test isweaklysubset(exp(interval(BigFloat, 0.1)), exp(interval(0.1))) + @test isweaksubset(exp(interval(BigFloat, 0.1)), exp(interval(0.1))) @test isequalinterval(exp(interval(0.1)), interval(1.1051709180756475e+00, 1.1051709180756477e+00)) @test diam(exp(interval(0.1))) == eps(exp(0.1)) - @test isweaklysubset(log(interval(BigFloat, 1//2)), log(interval(1//2))) + @test isweaksubset(log(interval(BigFloat, 1//2)), log(interval(1//2))) @test ismember(log(big(1//2)), log(interval(1//2))) - @test isweaklysubset(log(interval(BigFloat, 0.1)), log(interval(0.1))) + @test isweaksubset(log(interval(BigFloat, 0.1)), log(interval(0.1))) @test isequalinterval(log(interval(0.1)), interval(-2.3025850929940459e+00, -2.3025850929940455e+00)) @test diam(log(interval(0.1))) == eps(log(0.1)) - @test isweaklysubset(exp2(interval(BigFloat, 1//2)), exp2(interval(1//2))) + @test isweaksubset(exp2(interval(BigFloat, 1//2)), exp2(interval(1//2))) @test isequalinterval(exp2(interval(1024.0)), interval(1.7976931348623157e308, Inf)) - @test isweaklysubset(exp10(interval(BigFloat, 1//2)), exp10(interval(1//2))) + @test isweaksubset(exp10(interval(BigFloat, 1//2)), exp10(interval(1//2))) @test isequalinterval(exp10(interval(308.5)), interval(1.7976931348623157e308, Inf)) - @test isweaklysubset(log2(interval(BigFloat, 1//2)), log2(interval(1//2))) + @test isweaksubset(log2(interval(BigFloat, 1//2)), log2(interval(1//2))) @test isequalinterval(log2(interval(0.25, 0.5)), interval(-2.0, -1.0)) @test ismember(log10(big(1//10)), log10(interval(1//10))) @test isequalinterval(log10(interval(0.01, 0.1)), interval(log10(0.01, RoundDown), log10(0.1, RoundUp))) @@ -189,7 +189,7 @@ end d = interval(0.1, 2) @test isstrictless(d, interval(3)) - @test isweaklyless(d, interval(2)) + @test isweakless(d, interval(2)) @test isstrictless(interval(-1), d) # abs @@ -206,7 +206,7 @@ end @test isequalinterval(interval(f*g), interval(1//9)) @test isequalinterval(interval(1//9), interval(1//9, 1//9)) @test isequalinterval(interval(f, g) - 1, interval(-2 // 3, -2 // 3)) - @test isweaklysubset(interval(f*g), interval(1)/9) + @test isweaksubset(interval(f*g), interval(1)/9) end @testset "Floor etc. tests" begin @@ -292,8 +292,8 @@ end @test isequalinterval(pow(interval(BigFloat, 1, 2), 2), interval(1, 4)) x = interval(pi) - @test isweaklysubset(x^100, pow(x, 100)) - @test isweaklysubset(x^50, pow(x, 50)) + @test isweaksubset(x^100, pow(x, 100)) + @test isweaksubset(x^50, pow(x, 50)) @test isinterior(x^50, pow(x, 50)) x = interval(2) @@ -310,7 +310,7 @@ end y = interval(-2, 3) @test isequalinterval(pow(y, 2.1), interval(0.0, 10.045108566305146)) - @test isweaklysubset(y^2.1, pow(y, 2.1)) + @test isweaksubset(y^2.1, pow(y, 2.1)) end @testset "Fast interval powers" begin @@ -333,10 +333,10 @@ end @testset "cbrt" begin @test isequalinterval(cbrt(interval(2, 3)), interval(1.259921049894873, 1.4422495703074085)) @test isequalinterval(cbrt(big(interval(2, 3))), interval(big"1.259921049894873164767210607278228350570251464701507980081975112155299676513956", big"1.442249570307408382321638310780109588391869253499350577546416194541687596830003")) - @test isweaklysubset(cbrt(big(interval(2, 3))), cbrt(interval(2, 3))) + @test isweaksubset(cbrt(big(interval(2, 3))), cbrt(interval(2, 3))) @test_skip ismissing(cbrt(big(interval(3, 4))) == cbrt(interval(3, 4))) @test isequalinterval(cbrt(interval(2f0, 3f0)), interval(1.259921f0, 1.4422497f0)) - @test isweaklysubset(cbrt(interval(2, 3)), cbrt(interval(2f0, 3f0))) + @test isweaksubset(cbrt(interval(2, 3)), cbrt(interval(2f0, 3f0))) end @testset "inv" begin diff --git a/test/interval_tests/power.jl b/test/interval_tests/power.jl index b5daf8a7c..03d0678a1 100644 --- a/test/interval_tests/power.jl +++ b/test/interval_tests/power.jl @@ -4,21 +4,21 @@ using IntervalArithmetic @testset "rational_power_test" begin @test isequalinterval(^(emptyinterval(), 1//3), emptyinterval()) @test isequalinterval(^(interval(1, 8), 1//3), interval(1, 2)) - @test isweaklysupset(^(interval(2, 8), 1//3), interval(2^(1//3), 2)) - @test isweaklysupset(^(interval(1, 9), 1//3), interval(1, 9^(1//3))) - @test isweaklysupset(^(interval(2, 9), 1//3), interval(2^(1//3), 9^(1//3))) + @test isweaksupset(^(interval(2, 8), 1//3), interval(2^(1//3), 2)) + @test isweaksupset(^(interval(1, 9), 1//3), interval(1, 9^(1//3))) + @test isweaksupset(^(interval(2, 9), 1//3), interval(2^(1//3), 9^(1//3))) @test isequalinterval(^(interval(-1, 8), 1//3), interval(0, 2)) - @test isweaklysupset(^(interval(-2, 8), 1//3), interval(0, 2)) - @test isweaklysupset(^(interval(-1, 9), 1//3), interval(0, 9^(1//3))) - @test isweaklysupset(^(interval(-2, 9), 1//3), interval(0, 9^(1//3))) + @test isweaksupset(^(interval(-2, 8), 1//3), interval(0, 2)) + @test isweaksupset(^(interval(-1, 9), 1//3), interval(0, 9^(1//3))) + @test isweaksupset(^(interval(-2, 9), 1//3), interval(0, 9^(1//3))) @test isequalinterval(^(interval(1, 8), -1//3), interval(0.5, 1)) - @test isweaklysupset(^(interval(2, 8), -1//3), interval(0.5, 2^(-1//3))) - @test isweaklysupset(^(interval(1, 9), -1//3), interval(9^(-1//3), 1)) - @test isweaklysupset(^(interval(2, 9), -1//3), interval(9^(-1//3), 2^(-1//3))) + @test isweaksupset(^(interval(2, 8), -1//3), interval(0.5, 2^(-1//3))) + @test isweaksupset(^(interval(1, 9), -1//3), interval(9^(-1//3), 1)) + @test isweaksupset(^(interval(2, 9), -1//3), interval(9^(-1//3), 2^(-1//3))) @test isequalinterval(^(interval(-1, 8), -1//3), interval(0.5, Inf)) - @test isweaklysupset(^(interval(-2, 8), -1//3), interval(0.5, Inf)) - @test isweaklysupset(^(interval(-1, 9), -1//3), interval(9^(-1//3), Inf)) - @test isweaklysupset(^(interval(-2, 9), -1//3), interval(9^(-1//3), Inf)) + @test isweaksupset(^(interval(-2, 8), -1//3), interval(0.5, Inf)) + @test isweaksupset(^(interval(-1, 9), -1//3), interval(9^(-1//3), Inf)) + @test isweaksupset(^(interval(-2, 9), -1//3), interval(9^(-1//3), Inf)) @test isequalinterval(^(interval(-2, 4), 1//2), interval(0, 2)) @test isequalinterval(^(interval(-2, 8), 1//3), interval(0, 2)) @test isequalinterval(^(interval(-8, -2), 1//3), emptyinterval()) @@ -27,21 +27,21 @@ using IntervalArithmetic @test isequalinterval(^(interval(-8, -2), -1//2), emptyinterval()) @test isequalinterval(^(emptyinterval(), 2//3), emptyinterval()) @test isequalinterval(^(interval(1, 8), 2//3), interval(1, 4)) - @test isweaklysupset(^(interval(2, 8), 2//3), interval(2^(2//3), 4)) - @test isweaklysupset(^(interval(1, 9), 2//3), interval(1, 9^(2//3))) - @test isweaklysupset(^(interval(2, 9), 2//3), interval(2^(2//3), 9^(2//3))) + @test isweaksupset(^(interval(2, 8), 2//3), interval(2^(2//3), 4)) + @test isweaksupset(^(interval(1, 9), 2//3), interval(1, 9^(2//3))) + @test isweaksupset(^(interval(2, 9), 2//3), interval(2^(2//3), 9^(2//3))) @test isequalinterval(^(interval(-1, 8), 2//3), interval(0, 4)) - @test isweaklysupset(^(interval(-2, 8), 2//3), interval(0, 4)) - @test isweaklysupset(^(interval(-1, 9), 2//3), interval(0, 9^(2//3))) - @test isweaklysupset(^(interval(-2, 9), 2//3), interval(0, 9^(2//3))) + @test isweaksupset(^(interval(-2, 8), 2//3), interval(0, 4)) + @test isweaksupset(^(interval(-1, 9), 2//3), interval(0, 9^(2//3))) + @test isweaksupset(^(interval(-2, 9), 2//3), interval(0, 9^(2//3))) @test isequalinterval(^(interval(1, 8), -2//3), interval(0.25, 1)) - @test isweaklysupset(^(interval(2, 8), -2//3), interval(0.25, 2^(-2//3))) - @test isweaklysupset(^(interval(1, 9), -2//3), interval(9^(-2//3), 1)) - @test isweaklysupset(^(interval(2, 9), -2//3), interval(9^(-2//3), 2^(-2//3))) + @test isweaksupset(^(interval(2, 8), -2//3), interval(0.25, 2^(-2//3))) + @test isweaksupset(^(interval(1, 9), -2//3), interval(9^(-2//3), 1)) + @test isweaksupset(^(interval(2, 9), -2//3), interval(9^(-2//3), 2^(-2//3))) @test isequalinterval(^(interval(-1, 8), -2//3), interval(0.25, Inf)) - @test isweaklysupset(^(interval(-2, 8), -2//3), interval(0.25, Inf)) - @test isweaklysupset(^(interval(-1, 9), -2//3), interval(9^(-2//3), Inf)) - @test isweaklysupset(^(interval(-2, 9), -2//3), interval(9^(-2//3), Inf)) + @test isweaksupset(^(interval(-2, 8), -2//3), interval(0.25, Inf)) + @test isweaksupset(^(interval(-1, 9), -2//3), interval(9^(-2//3), Inf)) + @test isweaksupset(^(interval(-2, 9), -2//3), interval(9^(-2//3), Inf)) @test isequalinterval(^(interval(-2, 4), 3//2), interval(0, 8)) @test isequalinterval(^(interval(-2, 8), 2//3), interval(0, 4)) @test isequalinterval(^(interval(-8, -2), 2//3), emptyinterval()) diff --git a/test/interval_tests/trig.jl b/test/interval_tests/trig.jl index fa360345c..63aea8d5d 100644 --- a/test/interval_tests/trig.jl +++ b/test/interval_tests/trig.jl @@ -2,8 +2,8 @@ using Test using IntervalArithmetic @testset "rad2deg/deg2rad" begin - @test isweaklysupset(rad2deg(interval(π, 2π)), interval(180, 360)) - @test isweaklysupset(deg2rad(interval(180, 360)), interval(π, 2interval(π))) + @test isweaksupset(rad2deg(interval(π, 2π)), interval(180, 360)) + @test isweaksupset(deg2rad(interval(180, 360)), interval(π, 2interval(π))) end @testset "sin" begin @@ -15,13 +15,13 @@ end @test isequalinterval(sin(interval(Float64, -4.5, 0.1)), interval(-1.0, 0.9775301176650971)) @test isequalinterval(sin(interval(Float64, 1.3, 6.3)), interval(-1.0, 1.0)) - @test isweaklysubset(sin(interval(BigFloat, 0.5, 0.5)), sin(interval(0.5))) - @test isweaklysubset(sin(interval(BigFloat, 0.5, 1.67)), sin(interval(0.5, 1.67))) - @test isweaklysubset(sin(interval(BigFloat, 1.67, 3.2)), sin(interval(1.67, 3.2))) - @test isweaklysubset(sin(interval(BigFloat, 2.1, 5.6)), sin(interval(2.1, 5.6))) - @test isweaklysubset(sin(interval(BigFloat, 0.5, 8.5)), sin(interval(0.5, 8.5))) - @test isweaklysubset(sin(interval(BigFloat, -4.5, 0.1)), sin(interval(-4.5, 0.1))) - @test isweaklysubset(sin(interval(BigFloat, 1.3, 6.3)), sin(interval(1.3, 6.3))) + @test isweaksubset(sin(interval(BigFloat, 0.5, 0.5)), sin(interval(0.5))) + @test isweaksubset(sin(interval(BigFloat, 0.5, 1.67)), sin(interval(0.5, 1.67))) + @test isweaksubset(sin(interval(BigFloat, 1.67, 3.2)), sin(interval(1.67, 3.2))) + @test isweaksubset(sin(interval(BigFloat, 2.1, 5.6)), sin(interval(2.1, 5.6))) + @test isweaksubset(sin(interval(BigFloat, 0.5, 8.5)), sin(interval(0.5, 8.5))) + @test isweaksubset(sin(interval(BigFloat, -4.5, 0.1)), sin(interval(-4.5, 0.1))) + @test isweaksubset(sin(interval(BigFloat, 1.3, 6.3)), sin(interval(1.3, 6.3))) end @testset "cos" begin @@ -31,28 +31,28 @@ end @test isequalinterval(cos(interval(0.5, 8.5)), interval(-1.0, 1.0)) @test isequalinterval(cos(interval(1.67, 3.2)), interval(-1.0, -0.09904103659872801)) - @test isweaklysubset(cos(interval(BigFloat, 0.5, 0.5)), cos(interval(0.5))) - @test isweaklysubset(cos(interval(BigFloat, 0.5, 1.67)), cos(interval(0.5, 1.67))) - @test isweaklysubset(cos(interval(BigFloat, 1.67, 3.2)), cos(interval(1.67, 3.2))) - @test isweaklysubset(cos(interval(BigFloat, 2.1, 5.6)), cos(interval(2.1, 5.6))) - @test isweaklysubset(cos(interval(BigFloat, 0.5, 8.5)), cos(interval(0.5, 8.5))) - @test isweaklysubset(cos(interval(BigFloat, -4.5, 0.1)), cos(interval(-4.5, 0.1))) - @test isweaklysubset(cos(interval(BigFloat, 1.3, 6.3)), cos(interval(1.3, 6.3))) + @test isweaksubset(cos(interval(BigFloat, 0.5, 0.5)), cos(interval(0.5))) + @test isweaksubset(cos(interval(BigFloat, 0.5, 1.67)), cos(interval(0.5, 1.67))) + @test isweaksubset(cos(interval(BigFloat, 1.67, 3.2)), cos(interval(1.67, 3.2))) + @test isweaksubset(cos(interval(BigFloat, 2.1, 5.6)), cos(interval(2.1, 5.6))) + @test isweaksubset(cos(interval(BigFloat, 0.5, 8.5)), cos(interval(0.5, 8.5))) + @test isweaksubset(cos(interval(BigFloat, -4.5, 0.1)), cos(interval(-4.5, 0.1))) + @test isweaksubset(cos(interval(BigFloat, 1.3, 6.3)), cos(interval(1.3, 6.3))) end @testset "sinpi" begin @test isequalinterval(sinpi(emptyinterval()), emptyinterval()) - @test isweaklysupset(sinpi(interval(1, 2)), interval(-1 , 0)) + @test isweaksupset(sinpi(interval(1, 2)), interval(-1 , 0)) @test isequalinterval(sinpi(interval(0.5, 1.5)), interval(-1 , 1)) - @test isweaklysupset(sinpi(interval(0.25, 0.75)), interval(1/sqrt(2) , 1)) - @test isweaklysupset(sinpi(interval(-0.25, 0.25)), interval(-1/sqrt(2) , 1/sqrt(2))) + @test isweaksupset(sinpi(interval(0.25, 0.75)), interval(1/sqrt(2) , 1)) + @test isweaksupset(sinpi(interval(-0.25, 0.25)), interval(-1/sqrt(2) , 1/sqrt(2))) end @testset "cospi" begin @test isequalinterval(cospi(emptyinterval()), emptyinterval()) @test isequalinterval(cospi(interval(1, 2)), interval(-1 , 1)) - @test isweaklysupset(cospi(interval(0.5, 1.5)), interval(-1 , 0)) - @test isweaklysupset(cospi(interval(0.25, 0.75)), interval(-1/sqrt(2) , 1/sqrt(2))) + @test isweaksupset(cospi(interval(0.5, 1.5)), interval(-1 , 0)) + @test isweaksupset(cospi(interval(0.25, 0.75)), interval(-1/sqrt(2) , 1/sqrt(2))) @test isequalinterval(cospi(interval(-0.25, 0.25)), interval(1/sqrt(2) , 1)) end @@ -60,13 +60,13 @@ end x = sincospi(emptyinterval()) @test isequalinterval(x[1], emptyinterval()) & isequalinterval(x[2], emptyinterval()) x = sincospi(interval(1, 2)) - @test isweaklysupset(x[1], interval(-1 , 0)) & isequalinterval(x[2], interval(-1 , 1)) + @test isweaksupset(x[1], interval(-1 , 0)) & isequalinterval(x[2], interval(-1 , 1)) x = sincospi(interval(0.5, 1.5)) - @test isequalinterval(x[1], interval(-1 , 1)) & isweaklysupset(x[2], interval(-1 , 0)) + @test isequalinterval(x[1], interval(-1 , 1)) & isweaksupset(x[2], interval(-1 , 0)) x = sincospi(interval(0.25, 0.75)) - @test isweaklysupset(x[1], interval(1/sqrt(2) , 1)) & isweaklysupset(x[2], interval(-1/sqrt(2) , 1/sqrt(2))) + @test isweaksupset(x[1], interval(1/sqrt(2) , 1)) & isweaksupset(x[2], interval(-1/sqrt(2) , 1/sqrt(2))) x = sincospi(interval(-0.25, 0.25)) - @test isweaklysupset(x[1], interval(-1/sqrt(2) , 1/sqrt(2))) & isequalinterval(x[2], interval(1/sqrt(2) , 1)) + @test isweaksupset(x[1], interval(-1/sqrt(2) , 1/sqrt(2))) & isequalinterval(x[2], interval(1/sqrt(2) , 1)) end @testset "tan" begin @@ -75,14 +75,14 @@ end @test isequalinterval(tan(interval(1.67, 3.2)), interval(-10.047182299210307, 0.05847385445957865)) @test isequalinterval(tan(interval(6.638314112824137, 8.38263151220128)), entireinterval()) # https://github.com/JuliaIntervals/IntervalArithmetic.jl/pull/20 - @test isweaklysubset(tan(interval(BigFloat, 0.5, 0.5)), tan(interval(0.5))) + @test isweaksubset(tan(interval(BigFloat, 0.5, 0.5)), tan(interval(0.5))) @test isequalinterval(tan(interval(BigFloat, 0.5, 1.67)), entireinterval(BigFloat)) - @test isweaklysubset(tan(interval(BigFloat, 0.5, 1.67)), tan(interval(0.5, 1.67))) - @test isweaklysubset(tan(interval(BigFloat, 1.67, 3.2)), tan(interval(1.67, 3.2))) - @test isweaklysubset(tan(interval(BigFloat, 2.1, 5.6)), tan(interval(2.1, 5.6))) - @test isweaklysubset(tan(interval(BigFloat, 0.5, 8.5)), tan(interval(0.5, 8.5))) - @test isweaklysubset(tan(interval(BigFloat, -4.5, 0.1)), tan(interval(-4.5, 0.1))) - @test isweaklysubset(tan(interval(BigFloat, 1.3, 6.3)), tan(interval(1.3, 6.3))) + @test isweaksubset(tan(interval(BigFloat, 0.5, 1.67)), tan(interval(0.5, 1.67))) + @test isweaksubset(tan(interval(BigFloat, 1.67, 3.2)), tan(interval(1.67, 3.2))) + @test isweaksubset(tan(interval(BigFloat, 2.1, 5.6)), tan(interval(2.1, 5.6))) + @test isweaksubset(tan(interval(BigFloat, 0.5, 8.5)), tan(interval(0.5, 8.5))) + @test isweaksubset(tan(interval(BigFloat, -4.5, 0.1)), tan(interval(-4.5, 0.1))) + @test isweaksubset(tan(interval(BigFloat, 1.3, 6.3)), tan(interval(1.3, 6.3))) end @@ -91,22 +91,22 @@ end @test isequalinterval(asin(interval(0.9, 2)), asin(interval(0.9, 1))) @test isequalinterval(asin(interval(3, 4)), emptyinterval()) - @test isweaklysubset(asin(interval(BigFloat, 1, 1)), asin(interval(1))) - @test isweaklysubset(asin(interval(BigFloat, 0.9, 2)), asin(interval(0.9, 2))) - @test isweaklysubset(asin(interval(BigFloat, 3, 4)), asin(interval(3, 4))) + @test isweaksubset(asin(interval(BigFloat, 1, 1)), asin(interval(1))) + @test isweaksubset(asin(interval(BigFloat, 0.9, 2)), asin(interval(0.9, 2))) + @test isweaksubset(asin(interval(BigFloat, 3, 4)), asin(interval(3, 4))) @test isequalinterval(acos(interval(1)), interval(0., 0.)) @test isequalinterval(acos(interval(-2, -0.9)), acos(interval(-1, -0.9))) @test isequalinterval(acos(interval(3, 4)), emptyinterval()) - @test isweaklysubset(acos(interval(BigFloat, 1, 1)), acos(interval(1))) - @test isweaklysubset(acos(interval(BigFloat, -2, -0.9)), acos(interval(-2, -0.9))) - @test isweaklysubset(acos(interval(BigFloat, 3, 4)), acos(interval(3, 4))) + @test isweaksubset(acos(interval(BigFloat, 1, 1)), acos(interval(1))) + @test isweaksubset(acos(interval(BigFloat, -2, -0.9)), acos(interval(-2, -0.9))) + @test isweaksubset(acos(interval(BigFloat, 3, 4)), acos(interval(3, 4))) @test isequalinterval(atan(interval(-1,1)), interval(-interval(Float64, π).hi/4, interval(Float64, π).hi/4)) @test isequalinterval(atan(interval(0)), interval(0.0, 0.0)) - @test isweaklysubset(atan(interval(BigFloat, -1, 1)), atan(interval(-1, 1))) + @test isweaksubset(atan(interval(BigFloat, -1, 1)), atan(interval(-1, 1))) end @testset "atan" begin @@ -117,79 +117,79 @@ end @test isequalinterval(atan(interval(-1.0, -0.1), interval(0.0)), -interval(π)/2) @test isequalinterval(atan(interval(-1.0, 1.0), interval(0.0)), interval(-0.5, 0.5) * interval(π)) @test isequalinterval(atan(interval(0.0), interval(0.1, 1.0)), interval(0.0)) - @test isweaklysubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, 0.1, 1.0)), + @test isweaksubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, 0.1, 1.0)), atan(interval(0.0, 0.1), interval(0.1, 1.0))) @test isequalinterval(atan(interval(0.0, 0.1), interval(0.1, 1.0)), interval(0.0, 0.7853981633974484)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, 0.0), interval(BigFloat, 0.1, 1.0)), + @test isweaksubset(atan(interval(BigFloat, -0.1, 0.0), interval(BigFloat, 0.1, 1.0)), atan(interval(-0.1, 0.0), interval(0.1, 1.0))) @test isequalinterval(atan(interval(-0.1, 0.0), interval(0.1, 1.0)), interval(-0.7853981633974484, 0.0)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, -0.1), interval(BigFloat, 0.1, Inf)), + @test isweaksubset(atan(interval(BigFloat, -0.1, -0.1), interval(BigFloat, 0.1, Inf)), atan(interval(-0.1, -0.1), interval(0.1, Inf))) @test isequalinterval(atan(interval(-0.1, 0.0), interval(0.1, Inf)), interval(-0.7853981633974484, 0.0)) - @test isweaklysubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, -2.0, -0.1)), + @test isweaksubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, -2.0, -0.1)), atan(interval(0.0, 0.1), interval(-2.0, -0.1))) @test isequalinterval(atan(interval(0.0, 0.1), interval(-2.0, -0.1)), interval(2.356194490192345, 3.1415926535897936)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, 0.0), interval(BigFloat, -2.0, -0.1)), + @test isweaksubset(atan(interval(BigFloat, -0.1, 0.0), interval(BigFloat, -2.0, -0.1)), atan(interval(-0.1, 0.0), interval(-2.0, -0.1))) @test isequalinterval(atan(interval(-0.1, 0.0), interval(-2.0, -0.1)), interval(-1, 1) * interval(π)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -Inf, -0.1)), + @test isweaksubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -Inf, -0.1)), atan(interval(-0.1, 0.1), interval(-Inf, -0.1))) @test isequalinterval(atan(interval(-0.1, 0.1), interval(-Inf, -0.1)), interval(-1, 1) * interval(π)) - @test isweaklysubset(atan(interval(BigFloat, 0.0, 0.0), interval(BigFloat, -2.0, 0.0)), + @test isweaksubset(atan(interval(BigFloat, 0.0, 0.0), interval(BigFloat, -2.0, 0.0)), atan(interval(0.0, 0.0), interval(-2.0, 0.0))) @test isequalinterval(atan(interval(-0.0, 0.0), interval(-2.0, 0.0)), interval(3.141592653589793, 3.1415926535897936)) - @test isweaklysubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, -0.1, 0.0)), + @test isweaksubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, -0.1, 0.0)), atan(interval(0.0, 0.1), interval(-0.1, 0.0))) @test isequalinterval(atan(interval(-0.0, 0.1), interval(-0.1, 0.0)), interval(1.5707963267948966, 3.1415926535897936)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, -0.1), interval(BigFloat, -0.1, 0.0)), + @test isweaksubset(atan(interval(BigFloat, -0.1, -0.1), interval(BigFloat, -0.1, 0.0)), atan(interval(-0.1, -0.1), interval(-0.1, 0.0))) @test isequalinterval(atan(interval(-0.1, -0.1), interval(-0.1, 0.0)), interval(-2.3561944901923453, -1.5707963267948966)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -2.0, 0.0)), + @test isweaksubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -2.0, 0.0)), atan(interval(-0.1, 0.1), interval(-2.0, 0.0))) @test isequalinterval(atan(interval(-0.1, 0.1), interval(-2.0, 0.0)), interval(-1, 1) * interval(π)) - @test isweaklysubset(atan(interval(BigFloat, 0.0, 0.0), interval(BigFloat, -2.0, 0.0)), + @test isweaksubset(atan(interval(BigFloat, 0.0, 0.0), interval(BigFloat, -2.0, 0.0)), atan(interval(0.0, 0.0), interval(-2.0, 0.0))) @test isequalinterval(atan(interval(-0.0, 0.0), interval(-2.0, 0.0)), interval(3.141592653589793, 3.1415926535897936)) - @test isweaklysubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, -0.1, 0.0)), + @test isweaksubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, -0.1, 0.0)), atan(interval(0.0, 0.1), interval(-0.1, 0.0))) @test isequalinterval(atan(interval(-0.0, 0.1), interval(-0.1, 0.0)), interval(1.5707963267948966, 3.1415926535897936)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, -0.1), interval(BigFloat, -0.1, 0.0)), + @test isweaksubset(atan(interval(BigFloat, -0.1, -0.1), interval(BigFloat, -0.1, 0.0)), atan(interval(-0.1, -0.1), interval(-0.1, 0.0))) @test isequalinterval(atan(interval(-0.1, -0.1), interval(-0.1, 0.0)), interval(-2.3561944901923453, -1.5707963267948966)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -2.0, 0.0)), + @test isweaksubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -2.0, 0.0)), atan(interval(-0.1, 0.1), interval(-2.0, 0.0))) @test isequalinterval(atan(interval(-0.1, 0.1), interval(-2.0, 0.0)), interval(-1, 1) * interval(π)) - @test isweaklysubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, -2.0, 0.1)), + @test isweaksubset(atan(interval(BigFloat, 0.0, 0.1), interval(BigFloat, -2.0, 0.1)), atan(interval(0.0, 0.1), interval(-2.0, 0.1))) @test isequalinterval(atan(interval(-0.0, 0.1), interval(-2.0, 0.1)), interval(0.0, 3.1415926535897936)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, -0.1), interval(BigFloat, -0.1, 0.1)), + @test isweaksubset(atan(interval(BigFloat, -0.1, -0.1), interval(BigFloat, -0.1, 0.1)), atan(interval(-0.1, -0.1), interval(-0.1, 0.1))) @test isequalinterval(atan(interval(-0.1, -0.1), interval(-0.1, 0.1)), interval(-2.3561944901923453, Float64(-big(pi)/4, RoundUp))) - @test isweaklysubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -2.0, 0.1)), + @test isweaksubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -2.0, 0.1)), atan(interval(-0.1, 0.1), interval(-2.0, 0.1))) @test isequalinterval(interval(-1, 1) * interval(π), atan(interval(-0.1, 0.1), interval(-2.0, 0.1))) @test isequalinterval(atan(interval(-0.1, 0.1), interval(0.1, 0.1)), interval(-0.7853981633974484, 0.7853981633974484)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, 0.1, 0.1)), + @test isweaksubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, 0.1, 0.1)), atan(interval(-0.1, 0.1), interval(0.1, 0.1))) @test isequalinterval(atan(interval(0.0), interval(-0.0, 0.1)), interval(0.0)) @test isequalinterval(atan(interval(0.0, 0.1), interval(-0.0, 0.1)), @@ -198,12 +198,12 @@ end interval(-1.5707963267948968, 0.0)) @test isequalinterval(atan(interval(-0.1, 0.1), interval(-0.0, 0.1)), interval(-1.5707963267948968, 1.5707963267948968)) - @test isweaklysubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -0.0, 0.1)), + @test isweaksubset(atan(interval(BigFloat, -0.1, 0.1), interval(BigFloat, -0.0, 0.1)), atan(interval(-0.1, 0.1), interval(0.0, 0.1))) @test isequalinterval(atan(interval(Float32, -0.1, 0.1), interval(Float32, 0.1, 0.1)), interval(-0.78539824f0, 0.78539824f0)) - @test isweaklysubset(atan(interval(-0.1, 0.1), interval(0.1, 0.1)), + @test isweaksubset(atan(interval(-0.1, 0.1), interval(0.1, 0.1)), atan(interval(Float32, -0.1, 0.1), interval(Float32, 0.1, 0.1))) @test isequalinterval(atan(interval(Float32, 0.0, 0.0), interval(Float32, -0.0, 0.1)), interval(Float32, 0.0, 0.0)) @@ -213,13 +213,13 @@ end interval(-1.5707964f0, 0.0)) @test isequalinterval(atan(interval(Float32, -0.1, 0.1), interval(Float32, -0.0, 0.1)), interval(-1.5707964f0, 1.5707964f0)) - @test isweaklysubset(atan(interval(-0.1, 0.1), interval(-0.0, 0.1)), + @test isweaksubset(atan(interval(-0.1, 0.1), interval(-0.0, 0.1)), atan(interval(Float32, -0.1, 0.1), interval(Float32, 0.0, 0.1))) end @testset "Trig" begin for a in ( interval(17, 19), interval(0.5, 1.2) ) - @test isweaklysubset(tan(a), sin(a)/cos(a)) + @test isweaksubset(tan(a), sin(a)/cos(a)) end @test isequalinterval(sin(interval(-pi/2, 3pi/2)), interval(-1, 1)) diff --git a/test/test_ITF1788/c-xsc.jl b/test/test_ITF1788/c-xsc.jl index e1e272214..0415b9dce 100644 --- a/test/test_ITF1788/c-xsc.jl +++ b/test/test_ITF1788/c-xsc.jl @@ -206,31 +206,31 @@ end @test isinterior(interval(-3.0, 2.0), interval(-2.0, 2.0)) == false - @test isweaklysubset(interval(-1.0, 2.0), interval(-1.0, 2.0)) == true + @test isweaksubset(interval(-1.0, 2.0), interval(-1.0, 2.0)) == true - @test isweaklysubset(interval(-2.0, 1.0), interval(-3.0, 2.0)) == true + @test isweaksubset(interval(-2.0, 1.0), interval(-3.0, 2.0)) == true - @test isweaklysubset(interval(-2.0, 2.0), interval(-1.0, 1.0)) == false + @test isweaksubset(interval(-2.0, 2.0), interval(-1.0, 1.0)) == false - @test isweaklysubset(interval(-2.0, 2.0), interval(-1.0, 2.0)) == false + @test isweaksubset(interval(-2.0, 2.0), interval(-1.0, 2.0)) == false - @test isweaklysubset(interval(-2.0, 2.0), interval(-2.0, 1.0)) == false + @test isweaksubset(interval(-2.0, 2.0), interval(-2.0, 1.0)) == false - @test isweaklysubset(interval(-2.0, 2.0), interval(-2.0, 3.0)) == true + @test isweaksubset(interval(-2.0, 2.0), interval(-2.0, 3.0)) == true - @test isweaklysubset(interval(-2.0, 2.0), interval(-3.0, 2.0)) == true + @test isweaksubset(interval(-2.0, 2.0), interval(-3.0, 2.0)) == true - @test isweaklysubset(interval(-3.0, 2.0), interval(-2.0, 1.0)) == false + @test isweaksubset(interval(-3.0, 2.0), interval(-2.0, 1.0)) == false - @test isweaklysubset(interval(-1.0, 1.0), interval(-2.0, 2.0)) == true + @test isweaksubset(interval(-1.0, 1.0), interval(-2.0, 2.0)) == true - @test isweaklysubset(interval(-1.0, 2.0), interval(-2.0, 2.0)) == true + @test isweaksubset(interval(-1.0, 2.0), interval(-2.0, 2.0)) == true - @test isweaklysubset(interval(-2.0, 1.0), interval(-2.0, 2.0)) == true + @test isweaksubset(interval(-2.0, 1.0), interval(-2.0, 2.0)) == true - @test isweaklysubset(interval(-2.0, 3.0), interval(-2.0, 2.0)) == false + @test isweaksubset(interval(-2.0, 3.0), interval(-2.0, 2.0)) == false - @test isweaklysubset(interval(-3.0, 2.0), interval(-2.0, 2.0)) == false + @test isweaksubset(interval(-3.0, 2.0), interval(-2.0, 2.0)) == false @test isequalinterval(interval(-1.0, 2.0), interval(-1.0, 2.0)) == true @@ -278,33 +278,33 @@ end @test isinterior(interval(-1.0, -1.0), interval(-1.0, -1.0)) == false - @test isweaklysubset(interval(-1.0, 2.0), interval(-2.0, -2.0)) == false + @test isweaksubset(interval(-1.0, 2.0), interval(-2.0, -2.0)) == false - @test isweaklysubset(interval(-2.0, 2.0), interval(-2.0, -2.0)) == false + @test isweaksubset(interval(-2.0, 2.0), interval(-2.0, -2.0)) == false - @test isweaklysubset(interval(-2.0, 2.0), interval(0.0, 0.0)) == false + @test isweaksubset(interval(-2.0, 2.0), interval(0.0, 0.0)) == false - @test isweaklysubset(interval(-2.0, 2.0), interval(2.0, 2.0)) == false + @test isweaksubset(interval(-2.0, 2.0), interval(2.0, 2.0)) == false - @test isweaklysubset(interval(-2.0, 2.0), interval(3.0, 3.0)) == false + @test isweaksubset(interval(-2.0, 2.0), interval(3.0, 3.0)) == false - @test isweaklysubset(interval(-1.0, -1.0), interval(1.0, 1.0)) == false + @test isweaksubset(interval(-1.0, -1.0), interval(1.0, 1.0)) == false - @test isweaklysubset(interval(-1.0, -1.0), interval(-1.0, -1.0)) == true + @test isweaksubset(interval(-1.0, -1.0), interval(-1.0, -1.0)) == true - @test isweaklysubset(interval(-2.0, -2.0), interval(-1.0, 2.0)) == false + @test isweaksubset(interval(-2.0, -2.0), interval(-1.0, 2.0)) == false - @test isweaklysubset(interval(-2.0, -2.0), interval(-2.0, 2.0)) == true + @test isweaksubset(interval(-2.0, -2.0), interval(-2.0, 2.0)) == true - @test isweaklysubset(interval(0.0, 0.0), interval(-2.0, 2.0)) == true + @test isweaksubset(interval(0.0, 0.0), interval(-2.0, 2.0)) == true - @test isweaklysubset(interval(2.0, 2.0), interval(-2.0, 2.0)) == true + @test isweaksubset(interval(2.0, 2.0), interval(-2.0, 2.0)) == true - @test isweaklysubset(interval(3.0, 3.0), interval(-2.0, 2.0)) == false + @test isweaksubset(interval(3.0, 3.0), interval(-2.0, 2.0)) == false - @test isweaklysubset(interval(1.0, 1.0), interval(-1.0, -1.0)) == false + @test isweaksubset(interval(1.0, 1.0), interval(-1.0, -1.0)) == false - @test isweaklysubset(interval(-1.0, -1.0), interval(-1.0, -1.0)) == true + @test isweaksubset(interval(-1.0, -1.0), interval(-1.0, -1.0)) == true @test isequalinterval(interval(-1.0, 2.0), interval(-2.0, -2.0)) == false diff --git a/test/test_ITF1788/libieeep1788_bool.jl b/test/test_ITF1788/libieeep1788_bool.jl index dc2a26ed5..79656f63c 100644 --- a/test/test_ITF1788/libieeep1788_bool.jl +++ b/test/test_ITF1788/libieeep1788_bool.jl @@ -248,241 +248,241 @@ end @testset "minimal_subset_test" begin - @test isweaklysubset(emptyinterval(), emptyinterval()) == true + @test isweaksubset(emptyinterval(), emptyinterval()) == true - @test isweaklysubset(emptyinterval(), interval(0.0,4.0)) == true + @test isweaksubset(emptyinterval(), interval(0.0,4.0)) == true - @test isweaklysubset(emptyinterval(), interval(-0.0,4.0)) == true + @test isweaksubset(emptyinterval(), interval(-0.0,4.0)) == true - @test isweaklysubset(emptyinterval(), interval(-0.1,1.0)) == true + @test isweaksubset(emptyinterval(), interval(-0.1,1.0)) == true - @test isweaklysubset(emptyinterval(), interval(-0.1,0.0)) == true + @test isweaksubset(emptyinterval(), interval(-0.1,0.0)) == true - @test isweaklysubset(emptyinterval(), interval(-0.1,-0.0)) == true + @test isweaksubset(emptyinterval(), interval(-0.1,-0.0)) == true - @test isweaklysubset(emptyinterval(), interval(-Inf,+Inf)) == true + @test isweaksubset(emptyinterval(), interval(-Inf,+Inf)) == true - @test isweaklysubset(interval(0.0,4.0), emptyinterval()) == false + @test isweaksubset(interval(0.0,4.0), emptyinterval()) == false - @test isweaklysubset(interval(-0.0,4.0), emptyinterval()) == false + @test isweaksubset(interval(-0.0,4.0), emptyinterval()) == false - @test isweaklysubset(interval(-0.1,1.0), emptyinterval()) == false + @test isweaksubset(interval(-0.1,1.0), emptyinterval()) == false - @test isweaklysubset(interval(-Inf,+Inf), emptyinterval()) == false + @test isweaksubset(interval(-Inf,+Inf), emptyinterval()) == false - @test isweaklysubset(interval(0.0,4.0), interval(-Inf,+Inf)) == true + @test isweaksubset(interval(0.0,4.0), interval(-Inf,+Inf)) == true - @test isweaklysubset(interval(-0.0,4.0), interval(-Inf,+Inf)) == true + @test isweaksubset(interval(-0.0,4.0), interval(-Inf,+Inf)) == true - @test isweaklysubset(interval(-0.1,1.0), interval(-Inf,+Inf)) == true + @test isweaksubset(interval(-0.1,1.0), interval(-Inf,+Inf)) == true - @test isweaklysubset(interval(-Inf,+Inf), interval(-Inf,+Inf)) == true + @test isweaksubset(interval(-Inf,+Inf), interval(-Inf,+Inf)) == true - @test isweaklysubset(interval(1.0,2.0), interval(1.0,2.0)) == true + @test isweaksubset(interval(1.0,2.0), interval(1.0,2.0)) == true - @test isweaklysubset(interval(1.0,2.0), interval(0.0,4.0)) == true + @test isweaksubset(interval(1.0,2.0), interval(0.0,4.0)) == true - @test isweaklysubset(interval(1.0,2.0), interval(-0.0,4.0)) == true + @test isweaksubset(interval(1.0,2.0), interval(-0.0,4.0)) == true - @test isweaklysubset(interval(0.1,0.2), interval(0.0,4.0)) == true + @test isweaksubset(interval(0.1,0.2), interval(0.0,4.0)) == true - @test isweaklysubset(interval(0.1,0.2), interval(-0.0,4.0)) == true + @test isweaksubset(interval(0.1,0.2), interval(-0.0,4.0)) == true - @test isweaklysubset(interval(-0.1,-0.1), interval(-4.0, 3.4)) == true + @test isweaksubset(interval(-0.1,-0.1), interval(-4.0, 3.4)) == true - @test isweaklysubset(interval(0.0,0.0), interval(-0.0,-0.0)) == true + @test isweaksubset(interval(0.0,0.0), interval(-0.0,-0.0)) == true - @test isweaklysubset(interval(-0.0,-0.0), interval(0.0,0.0)) == true + @test isweaksubset(interval(-0.0,-0.0), interval(0.0,0.0)) == true - @test isweaklysubset(interval(-0.0,0.0), interval(0.0,0.0)) == true + @test isweaksubset(interval(-0.0,0.0), interval(0.0,0.0)) == true - @test isweaklysubset(interval(-0.0,0.0), interval(0.0,-0.0)) == true + @test isweaksubset(interval(-0.0,0.0), interval(0.0,-0.0)) == true - @test isweaklysubset(interval(0.0,-0.0), interval(0.0,0.0)) == true + @test isweaksubset(interval(0.0,-0.0), interval(0.0,0.0)) == true - @test isweaklysubset(interval(0.0,-0.0), interval(-0.0,0.0)) == true + @test isweaksubset(interval(0.0,-0.0), interval(-0.0,0.0)) == true end @testset "minimal_subset_dec_test" begin - @test isweaklysubset(nai(), nai()) == false + @test isweaksubset(nai(), nai()) == false - @test isweaklysubset(nai(), DecoratedInterval(emptyinterval(), trv)) == false + @test isweaksubset(nai(), DecoratedInterval(emptyinterval(), trv)) == false - @test isweaklysubset(nai(), DecoratedInterval(interval(0.0,4.0), trv)) == false + @test isweaksubset(nai(), DecoratedInterval(interval(0.0,4.0), trv)) == false - @test isweaklysubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(0.0,4.0), trv)) == true + @test isweaksubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(0.0,4.0), trv)) == true - @test isweaklysubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-0.0,4.0), def)) == true + @test isweaksubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-0.0,4.0), def)) == true - @test isweaklysubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-0.1,1.0), trv)) == true + @test isweaksubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-0.1,1.0), trv)) == true - @test isweaklysubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-0.1,0.0), trv)) == true + @test isweaksubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-0.1,0.0), trv)) == true - @test isweaklysubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-0.1,-0.0), trv)) == true + @test isweaksubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-0.1,-0.0), trv)) == true - @test isweaklysubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true + @test isweaksubset(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(0.0,4.0), trv), DecoratedInterval(emptyinterval(), trv)) == false + @test isweaksubset(DecoratedInterval(interval(0.0,4.0), trv), DecoratedInterval(emptyinterval(), trv)) == false - @test isweaklysubset(DecoratedInterval(interval(-0.0,4.0), def), DecoratedInterval(emptyinterval(), trv)) == false + @test isweaksubset(DecoratedInterval(interval(-0.0,4.0), def), DecoratedInterval(emptyinterval(), trv)) == false - @test isweaklysubset(DecoratedInterval(interval(-0.1,1.0), trv), DecoratedInterval(emptyinterval(), trv)) == false + @test isweaksubset(DecoratedInterval(interval(-0.1,1.0), trv), DecoratedInterval(emptyinterval(), trv)) == false - @test isweaklysubset(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(emptyinterval(), trv)) == false + @test isweaksubset(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(emptyinterval(), trv)) == false - @test isweaklysubset(DecoratedInterval(interval(0.0,4.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true + @test isweaksubset(DecoratedInterval(interval(0.0,4.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(-0.0,4.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true + @test isweaksubset(DecoratedInterval(interval(-0.0,4.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(-0.1,1.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true + @test isweaksubset(DecoratedInterval(interval(-0.1,1.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true + @test isweaksubset(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(interval(1.0,2.0), trv)) == true + @test isweaksubset(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(interval(1.0,2.0), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(interval(0.0,4.0), trv)) == true + @test isweaksubset(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(interval(0.0,4.0), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(1.0,2.0), def), DecoratedInterval(interval(-0.0,4.0), def)) == true + @test isweaksubset(DecoratedInterval(interval(1.0,2.0), def), DecoratedInterval(interval(-0.0,4.0), def)) == true - @test isweaklysubset(DecoratedInterval(interval(0.1,0.2), trv), DecoratedInterval(interval(0.0,4.0), trv)) == true + @test isweaksubset(DecoratedInterval(interval(0.1,0.2), trv), DecoratedInterval(interval(0.0,4.0), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(0.1,0.2), trv), DecoratedInterval(interval(-0.0,4.0), def)) == true + @test isweaksubset(DecoratedInterval(interval(0.1,0.2), trv), DecoratedInterval(interval(-0.0,4.0), def)) == true - @test isweaklysubset(DecoratedInterval(interval(-0.1,-0.1), trv), DecoratedInterval(interval(-4.0, 3.4), trv)) == true + @test isweaksubset(DecoratedInterval(interval(-0.1,-0.1), trv), DecoratedInterval(interval(-4.0, 3.4), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(0.0,0.0), trv), DecoratedInterval(interval(-0.0,-0.0), trv)) == true + @test isweaksubset(DecoratedInterval(interval(0.0,0.0), trv), DecoratedInterval(interval(-0.0,-0.0), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(-0.0,-0.0), trv), DecoratedInterval(interval(0.0,0.0), def)) == true + @test isweaksubset(DecoratedInterval(interval(-0.0,-0.0), trv), DecoratedInterval(interval(0.0,0.0), def)) == true - @test isweaklysubset(DecoratedInterval(interval(-0.0,0.0), trv), DecoratedInterval(interval(0.0,0.0), trv)) == true + @test isweaksubset(DecoratedInterval(interval(-0.0,0.0), trv), DecoratedInterval(interval(0.0,0.0), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(-0.0,0.0), trv), DecoratedInterval(interval(0.0,-0.0), trv)) == true + @test isweaksubset(DecoratedInterval(interval(-0.0,0.0), trv), DecoratedInterval(interval(0.0,-0.0), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(0.0,-0.0), def), DecoratedInterval(interval(0.0,0.0), trv)) == true + @test isweaksubset(DecoratedInterval(interval(0.0,-0.0), def), DecoratedInterval(interval(0.0,0.0), trv)) == true - @test isweaklysubset(DecoratedInterval(interval(0.0,-0.0), trv), DecoratedInterval(interval(-0.0,0.0), trv)) == true + @test isweaksubset(DecoratedInterval(interval(0.0,-0.0), trv), DecoratedInterval(interval(-0.0,0.0), trv)) == true end @testset "minimal_less_test" begin - @test isweaklyless(emptyinterval(), emptyinterval()) == true + @test isweakless(emptyinterval(), emptyinterval()) == true - @test isweaklyless(interval(1.0,2.0), emptyinterval()) == false + @test isweakless(interval(1.0,2.0), emptyinterval()) == false - @test isweaklyless(emptyinterval(), interval(1.0,2.0)) == false + @test isweakless(emptyinterval(), interval(1.0,2.0)) == false - @test isweaklyless(interval(-Inf,+Inf), interval(-Inf,+Inf)) == true + @test isweakless(interval(-Inf,+Inf), interval(-Inf,+Inf)) == true - @test isweaklyless(interval(1.0,2.0), interval(-Inf,+Inf)) == false + @test isweakless(interval(1.0,2.0), interval(-Inf,+Inf)) == false - @test isweaklyless(interval(0.0,2.0), interval(-Inf,+Inf)) == false + @test isweakless(interval(0.0,2.0), interval(-Inf,+Inf)) == false - @test isweaklyless(interval(-0.0,2.0), interval(-Inf,+Inf)) == false + @test isweakless(interval(-0.0,2.0), interval(-Inf,+Inf)) == false - @test isweaklyless(interval(-Inf,+Inf), interval(1.0,2.0)) == false + @test isweakless(interval(-Inf,+Inf), interval(1.0,2.0)) == false - @test isweaklyless(interval(-Inf,+Inf), interval(0.0,2.0)) == false + @test isweakless(interval(-Inf,+Inf), interval(0.0,2.0)) == false - @test isweaklyless(interval(-Inf,+Inf), interval(-0.0,2.0)) == false + @test isweakless(interval(-Inf,+Inf), interval(-0.0,2.0)) == false - @test isweaklyless(interval(0.0,2.0), interval(0.0,2.0)) == true + @test isweakless(interval(0.0,2.0), interval(0.0,2.0)) == true - @test isweaklyless(interval(0.0,2.0), interval(-0.0,2.0)) == true + @test isweakless(interval(0.0,2.0), interval(-0.0,2.0)) == true - @test isweaklyless(interval(0.0,2.0), interval(1.0,2.0)) == true + @test isweakless(interval(0.0,2.0), interval(1.0,2.0)) == true - @test isweaklyless(interval(-0.0,2.0), interval(1.0,2.0)) == true + @test isweakless(interval(-0.0,2.0), interval(1.0,2.0)) == true - @test isweaklyless(interval(1.0,2.0), interval(1.0,2.0)) == true + @test isweakless(interval(1.0,2.0), interval(1.0,2.0)) == true - @test isweaklyless(interval(1.0,2.0), interval(3.0,4.0)) == true + @test isweakless(interval(1.0,2.0), interval(3.0,4.0)) == true - @test isweaklyless(interval(1.0,3.5), interval(3.0,4.0)) == true + @test isweakless(interval(1.0,3.5), interval(3.0,4.0)) == true - @test isweaklyless(interval(1.0,4.0), interval(3.0,4.0)) == true + @test isweakless(interval(1.0,4.0), interval(3.0,4.0)) == true - @test isweaklyless(interval(-2.0,-1.0), interval(-2.0,-1.0)) == true + @test isweakless(interval(-2.0,-1.0), interval(-2.0,-1.0)) == true - @test isweaklyless(interval(-3.0,-1.5), interval(-2.0,-1.0)) == true + @test isweakless(interval(-3.0,-1.5), interval(-2.0,-1.0)) == true - @test isweaklyless(interval(0.0,0.0), interval(-0.0,-0.0)) == true + @test isweakless(interval(0.0,0.0), interval(-0.0,-0.0)) == true - @test isweaklyless(interval(-0.0,-0.0), interval(0.0,0.0)) == true + @test isweakless(interval(-0.0,-0.0), interval(0.0,0.0)) == true - @test isweaklyless(interval(-0.0,0.0), interval(0.0,0.0)) == true + @test isweakless(interval(-0.0,0.0), interval(0.0,0.0)) == true - @test isweaklyless(interval(-0.0,0.0), interval(0.0,-0.0)) == true + @test isweakless(interval(-0.0,0.0), interval(0.0,-0.0)) == true - @test isweaklyless(interval(0.0,-0.0), interval(0.0,0.0)) == true + @test isweakless(interval(0.0,-0.0), interval(0.0,0.0)) == true - @test isweaklyless(interval(0.0,-0.0), interval(-0.0,0.0)) == true + @test isweakless(interval(0.0,-0.0), interval(-0.0,0.0)) == true end @testset "minimal_less_dec_test" begin - @test isweaklyless(nai(), nai()) == false + @test isweakless(nai(), nai()) == false - @test isweaklyless(DecoratedInterval(emptyinterval(), trv), nai()) == false + @test isweakless(DecoratedInterval(emptyinterval(), trv), nai()) == false - @test isweaklyless(DecoratedInterval(interval(1.0,2.0), trv), nai()) == false + @test isweakless(DecoratedInterval(interval(1.0,2.0), trv), nai()) == false - @test isweaklyless(nai(), DecoratedInterval(interval(1.0,2.0), def)) == false + @test isweakless(nai(), DecoratedInterval(interval(1.0,2.0), def)) == false - @test isweaklyless(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(emptyinterval(), trv)) == true + @test isweakless(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(emptyinterval(), trv)) == true - @test isweaklyless(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(emptyinterval(), trv)) == false + @test isweakless(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(emptyinterval(), trv)) == false - @test isweaklyless(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(1.0,2.0), trv)) == false + @test isweakless(DecoratedInterval(emptyinterval(), trv), DecoratedInterval(interval(1.0,2.0), trv)) == false - @test isweaklyless(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true + @test isweakless(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == true - @test isweaklyless(DecoratedInterval(interval(1.0,2.0), def), DecoratedInterval(interval(-Inf,+Inf), trv)) == false + @test isweakless(DecoratedInterval(interval(1.0,2.0), def), DecoratedInterval(interval(-Inf,+Inf), trv)) == false - @test isweaklyless(DecoratedInterval(interval(0.0,2.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == false + @test isweakless(DecoratedInterval(interval(0.0,2.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == false - @test isweaklyless(DecoratedInterval(interval(-0.0,2.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == false + @test isweakless(DecoratedInterval(interval(-0.0,2.0), trv), DecoratedInterval(interval(-Inf,+Inf), trv)) == false - @test isweaklyless(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(1.0,2.0), trv)) == false + @test isweakless(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(1.0,2.0), trv)) == false - @test isweaklyless(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(0.0,2.0), def)) == false + @test isweakless(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(0.0,2.0), def)) == false - @test isweaklyless(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(-0.0,2.0), trv)) == false + @test isweakless(DecoratedInterval(interval(-Inf,+Inf), trv), DecoratedInterval(interval(-0.0,2.0), trv)) == false - @test isweaklyless(DecoratedInterval(interval(0.0,2.0), trv), DecoratedInterval(interval(0.0,2.0), trv)) == true + @test isweakless(DecoratedInterval(interval(0.0,2.0), trv), DecoratedInterval(interval(0.0,2.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(0.0,2.0), trv), DecoratedInterval(interval(-0.0,2.0), trv)) == true + @test isweakless(DecoratedInterval(interval(0.0,2.0), trv), DecoratedInterval(interval(-0.0,2.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(0.0,2.0), def), DecoratedInterval(interval(1.0,2.0), def)) == true + @test isweakless(DecoratedInterval(interval(0.0,2.0), def), DecoratedInterval(interval(1.0,2.0), def)) == true - @test isweaklyless(DecoratedInterval(interval(-0.0,2.0), trv), DecoratedInterval(interval(1.0,2.0), trv)) == true + @test isweakless(DecoratedInterval(interval(-0.0,2.0), trv), DecoratedInterval(interval(1.0,2.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(interval(1.0,2.0), trv)) == true + @test isweakless(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(interval(1.0,2.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(interval(3.0,4.0), def)) == true + @test isweakless(DecoratedInterval(interval(1.0,2.0), trv), DecoratedInterval(interval(3.0,4.0), def)) == true - @test isweaklyless(DecoratedInterval(interval(1.0,3.5), trv), DecoratedInterval(interval(3.0,4.0), trv)) == true + @test isweakless(DecoratedInterval(interval(1.0,3.5), trv), DecoratedInterval(interval(3.0,4.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(1.0,4.0), trv), DecoratedInterval(interval(3.0,4.0), trv)) == true + @test isweakless(DecoratedInterval(interval(1.0,4.0), trv), DecoratedInterval(interval(3.0,4.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(-2.0,-1.0), trv), DecoratedInterval(interval(-2.0,-1.0), trv)) == true + @test isweakless(DecoratedInterval(interval(-2.0,-1.0), trv), DecoratedInterval(interval(-2.0,-1.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(-3.0,-1.5), trv), DecoratedInterval(interval(-2.0,-1.0), trv)) == true + @test isweakless(DecoratedInterval(interval(-3.0,-1.5), trv), DecoratedInterval(interval(-2.0,-1.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(0.0,0.0), trv), DecoratedInterval(interval(-0.0,-0.0), trv)) == true + @test isweakless(DecoratedInterval(interval(0.0,0.0), trv), DecoratedInterval(interval(-0.0,-0.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(-0.0,-0.0), trv), DecoratedInterval(interval(0.0,0.0), def)) == true + @test isweakless(DecoratedInterval(interval(-0.0,-0.0), trv), DecoratedInterval(interval(0.0,0.0), def)) == true - @test isweaklyless(DecoratedInterval(interval(-0.0,0.0), trv), DecoratedInterval(interval(0.0,0.0), trv)) == true + @test isweakless(DecoratedInterval(interval(-0.0,0.0), trv), DecoratedInterval(interval(0.0,0.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(-0.0,0.0), trv), DecoratedInterval(interval(0.0,-0.0), trv)) == true + @test isweakless(DecoratedInterval(interval(-0.0,0.0), trv), DecoratedInterval(interval(0.0,-0.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(0.0,-0.0), def), DecoratedInterval(interval(0.0,0.0), trv)) == true + @test isweakless(DecoratedInterval(interval(0.0,-0.0), def), DecoratedInterval(interval(0.0,0.0), trv)) == true - @test isweaklyless(DecoratedInterval(interval(0.0,-0.0), trv), DecoratedInterval(interval(-0.0,0.0), trv)) == true + @test isweakless(DecoratedInterval(interval(0.0,-0.0), trv), DecoratedInterval(interval(-0.0,0.0), trv)) == true end