diff --git a/Project.toml b/Project.toml index d3e32e458..08c50b952 100644 --- a/Project.toml +++ b/Project.toml @@ -5,7 +5,6 @@ version = "0.20.5" [deps] CRlibm = "96374032-68de-5a5b-8d9e-752f78720389" -CombinedParsers = "5ae71ed2-6f8a-4ed1-b94f-e14e8158f19e" EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56" FastRounding = "fa42c844-2597-5d31-933b-ebd51ab2693f" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/src/IntervalArithmetic.jl b/src/IntervalArithmetic.jl index 24e86065c..d15965713 100644 --- a/src/IntervalArithmetic.jl +++ b/src/IntervalArithmetic.jl @@ -8,7 +8,6 @@ import CRlibm import FastRounding import RoundingEmulator -using CombinedParsers using LinearAlgebra using Markdown using StaticArrays diff --git a/src/decorations/intervals.jl b/src/decorations/intervals.jl index 2a036daa0..614bae765 100644 --- a/src/decorations/intervals.jl +++ b/src/decorations/intervals.jl @@ -78,7 +78,7 @@ macro decorated(ex...) lo = :($x.lo) hi = :($x.hi) else - lo, hi = ex + lo, hi = ex end return :(DecoratedInterval($lo, $hi)) diff --git a/src/parsing.jl b/src/parsing.jl index f42be7a3e..7aa83fb8e 100644 --- a/src/parsing.jl +++ b/src/parsing.jl @@ -1,156 +1,241 @@ -# Functions to parse strings to intervals - """ parse(DecoratedInterval, s::AbstractString) -Parse a string of the form `"[a, b]_dec"` as a `DecoratedInterval` -with decoration `dec`. +Parse a string of the form `"[a, b]_dec"` as a `DecoratedInterval` with decoration `dec`. +If the decoration is not specified, it is computed based on the parsed interval. +If the input is an invalid string, a warning is printed and [NaI] is returned. The parser is +case unsensitive. + +### Examples + +```jldoctest +julia> @format true +Display parameters: +- format: standard +- decorations: true +- significant figures: 6 + +julia> parse(DecoratedInterval{Float64}, "[1, 2]") +[1, 2]_com + +julia> parse(DecoratedInterval{Float64}, "[1, 2]_def") +[1, 2]_def + +julia> parse(DecoratedInterval{Float64}, "foobar") +┌ Warning: invalid input, returning [NaI] +└ @ IntervalArithmetic ~/.julia/dev/IntervalArithmetic/src/parsing.jl:44 +[NaN, NaN]_ill +``` """ function parse(::Type{DecoratedInterval{T}}, s::AbstractString) where T - if '_' ∉ s - x = parse(Interval{T}, s) - return DecoratedInterval(x.lo, x.hi) - end + s = lowercase(strip(s)) + s == "[nai]" && return nai(T) + try + if '_' ∉ s + ival, _ = _parse(Interval{T}, s) + return DecoratedInterval{T}(ival) + end + + decorations = Dict( + "ill" => ill, + "trv" => trv, + "def" => def, + "dac" => dac, + "com" => com) - decorations = Dict( - "ill" => ill, - "trv" => trv, - "def" => def, - "dac" => dac, - "com" => com) + interval_string, dec = split(s, "_") - interval_string, dec = split(s, "_") - interval = parse(Interval{T}, interval_string) - return DecoratedInterval(interval, decorations[lowercase(dec)]) + ival, isnotcom = _parse(Interval{T}, interval_string) + dec_calc = decoration(ival) + + haskey(decorations, dec) || throw(ArgumentError("invalid decoration $dec")) + dec_given = decorations[dec] + + #= + If I try to give a decoration that is too high, e.g. [1, Inf]_com, then it + should error and return [NaI]. Exception to this is if the interval would be com + but becomes dac because of finite precision, e.g. "[1e403]_com" when parse to + Interval{Float64} is allowed to become [prevfloat(Inf), Inf]_dac without erroring. + The isnotcom flag returned by _parse is used to track if the interval was originally + smaller than com or became dac because of overflow. + =# + dec_given > dec_calc && isnotcom && throw(ArgumentError("invalid decoration $dec for $ival")) + + return DecoratedInterval{T}(ival, min(dec_given, dec_calc)) + catch e + if e isa ArgumentError + @warn "invalid input, returning [NaI]" + return nai(T) + else + rethrow(e) + end + end end """ parse(Interval, s::AbstractString) Parse a string as an `Interval`, according to the grammar specified -in Section 9.7 of the IEEE Std 1788-2015, with some extensions. +in Section 9.7 of the IEEE Std 1788-2015. The created interval is tight around the value described by the string, -including for number that have no exact float representation like "0.1". - -Roughly speaking, the valid forms are - - `[ 1.33 ]` or simply `1.33` : The interval containing only `1.33``. - - `[ 1.44, 2.78 ]` : The interval `[1.44, 2.78]`. - - `7.88 ± 0.03`: The interval `[7.85, 7.91]`.j - - `6.42?2` : The interval `6.42 ± 0.02`. The number after `?` represent - the uncertainty in the last digit. - Physicists would write it as `6.42(2)`. - Strangely enough, according to the standard, the default - value is `0.5` (e.g. `2.3? == 2.3 ± 0.05`). - The direction of the uncertainty can be given by adding 'u' or 'd' at - the end for the error going only up or down respectively (e.g. - `4.5?5u == [4.5, 5]`). +including for number that have no exact float representation like "0.1". If the input is +an invalid string, a warning is printed and an empty interval is returned. The parser is +case unsensitive. + +### Allowed format + +Here are some examples of allowed formats, for more details see sections 9.7 and 12.11 of +the standard + +- `[ 1.33 ]` or simply `1.33` : The interval containing only `1.33``. +- `[ 1.44, 2.78 ]` : The interval `[1.44, 2.78]`. +- `[empty]` : the empty interval +- `[entire]` or `[,]`: the interval `[-∞, ∞]` +- `[3,]`: The interval `[3, ∞]` +- `6.42?2` : The interval `6.42 ± 0.02`. The number after `?` represent the uncertainty in + the last digit. The default value is `0.5` (e.g. `2.3? == 2.3 ± 0.05`). The direction of + the uncertainty can be given by adding 'u' or 'd' at the end for the error going only up + or down respectively (e.g. `4.5?5u == [4.5, 5]`). +- `6.42?2e2` : The interval `(6.42 ± 0.02)⋅10³ == 642 ± 2` +- `3??u` : the interval `[3, ∞]` +- `3??u` : the interval `[3, ∞]` +- `3??` : the interval `[-∞, ∞]` + +### Examples + +```julia +julia> parse(Interval{Float64}, "[1, 2]") +[1, 2] + +julia> parse(Interval{Float64}, "[1,]") +[1, ∞] + +julia> parse(Interval{Float64}, "[,]") +[-∞, ∞] + +julia> parse(Interval{Float64}, "6.42?2e2") +[640, 644] + +julia> parse(Interval{Float64}, "foobar") +┌ Warning: invalid input, empty interval returned +└ @ IntervalArithmetic ~/.julia/dev/IntervalArithmetic/src/parsing.jl:68 +∅ +``` """ function parse(::Type{Interval{T}}, s::AbstractString) where T - p = interval_parser(Interval{T}) + s = lowercase(strip(s)) try - return parse(p, s) + ival, _ = _parse(Interval{T}, s) + return ival catch e - # We avoid CombinedParsers stacktraces because they are hard to read. - if !(e isa ArgumentError) - rethrow() + if e isa ArgumentError + @warn "invalid input, empty interval returned" + return emptyinterval(T) + else + rethrow(e) end end - - throw(ArgumentError("string \"$s\" can not be parsed to an interval.")) end """ -Same as `parse(T, s, rounding_mode)`, but also accept string representing rational numbers. -""" -function extended_parse(T, s, rounding_mode) - if '/' in s - num, denum = parse.(Int, split(s, '/')) - return T(num//denum, rounding_mode) - end + _parse(::Type{Interval{T}}, s::AbstractString) where T - return parse(T, s, rounding_mode) -end +tries to parse the string `s` to an interval of type `Interval{T}` and throws an argument +error if an invalid string is given. -""" - interval_parser(::Type{Interval}) +### Output -Return a parser that processes a string according to Section 9.7 of -the IEEE Std 1788-2015 and return an interval of the given type. - -It is an extension of the specification in the standard, more lenient -on what is allowed. +- the parsed interval +- a flag `isnotcom`, which is set to true if the input interval is not `com` and to false + otherwise. This is used to distinguish the case when an interval is supposed to be + unbounded (e.g. input `"[3, infinity]"`) or becomes unbounded because of overflow + (e.g. the input `"[3, 1e400]", which is parse to `[3, ∞]` when using `Float64`). """ -function interval_parser(::Type{Interval{T}}) where T - # Exclude a minimal number of Char and let Julia parse the number - # when needed - any_number = Lazy(Repeat1(CharNotIn("[]?ud"))) - integer = Lazy(Repeat1(CharIn("0123456789"))) - - point_interval = Either( - Sequence(seq -> seq[2], "[", trim(any_number), "]"), - trim(any_number) - ) do x - lo = extended_parse(T, join(x), RoundDown) - hi = extended_parse(T, join(x), RoundUp) - return checked_interval(lo, hi) - end - infsup_interval = Sequence( - "[", - trim(any_number), - ",", - trim(any_number), - "]") do seq - lo = extended_parse(T, join(seq[2]), RoundDown) - hi = extended_parse(T, join(seq[4]), RoundUp) - return checked_interval(lo, hi) - end - uncert_interval = Sequence( - any_number, - "?", - Optional(integer, default=missing), # The radius - Optional(CharIn("ud"), default='?'), - Optional(Sequence("e", any_number), default=("e", "0")) - ) do seq - x = join(seq[1]) - radius = ismissing(seq[3]) ? 1//2 : Rational(parse(Int, join(seq[3]))) - dir = seq[4] - exponent = parse(Int, join(seq[5][2])) - - # TODO The ulp calculation is wrong when x has an exponent - # e.g. 1.33e6?1 - # This is in principle not allowed by the standard but I see no reason - # to disallow it - # Remove the decimal point, scaling accordingly - if '.' in x - core, decimals = split(x, '.') - exponent -= length(decimals) - x = join([core, decimals]) +function _parse(::Type{Interval{T}}, s::AbstractString) where T + isnotcom = occursin("inf", s) + if startswith(s, '[') && endswith(s, ']') # parse as interval + s = strip(s[2:end-1]) + if ',' in s # infsupinterval + lo, hi = strip.(split(s, ',')) + isempty(lo) && (lo = "-inf"; isnotcom = true) + isempty(hi) && (hi = "inf"; isnotcom = true) + lo = parse_num(T, lo, RoundDown) + hi = parse_num(T, hi, RoundUp) + else # point interval + + (s == "empty" || isempty(s)) && return emptyinterval(T), true # emptyinterval + s == "entire" && return entireinterval(T), true # entireinterval + lo = parse_num(T, s, RoundDown) + hi = parse_num(T, s, RoundUp) end - - rhi = dir == 'd' ? Rational(0) : radius - rlo = dir == 'u' ? Rational(0) : radius - scale = exponent >= 0 ? 10^exponent : 1//10^-exponent - x = parse(Int, x) - lo = T((x - rlo)*scale, RoundDown) - hi = T((x + rhi)*scale, RoundUp) - return Interval(lo, hi) + elseif '?' in s # uncertainty interval + if occursin("??", s) # unbounded interval + isnotcom = true + m, _ = split(s, "??") + if 'u' in s # interval in the form [m, Inf] + lo = parse(T, m, RoundDown) + hi = T(Inf) + elseif 'd' in s # interval in the form [-Inf, m] + lo = T(-Inf) + hi = parse(T, m, RoundUp) + else + return entireinterval(T), true + end + else + m , vde = split(s, '?') + + # ulp computation + if '.' in m # ulp is last decimal position + ulp = 1/(big(10.0)^length(split(m, '.')[2])) + else # no decimal, hence ulp is unit + ulp = big(1.0) + end + m = parse(BigFloat, m) + + if 'e' in vde + vd, e = split(vde, 'e') + e = big(10.0) ^ parse(Int, e) + else + vd = vde + e = big(1.0) + end + + if 'u' in vd || 'd' in vd + d = last(vd) + v = vd[1:end-1] + else + d = 'b' # both directions + v = vd + end + + v = isempty(v) ? 1//2 : parse(BigInt, v) + if d == 'd' + lo = T((m - v * ulp) * e, RoundDown) + hi = T(m * e, RoundUp) + elseif d == 'u' + lo = T(m * e, RoundDown) + hi = T((m + v * ulp) * e, RoundUp) + else + lo = T((m - v * ulp) * e, RoundDown) + hi = T((m + v * ulp) * e, RoundUp) + end + end + else # number + lo = parse_num(T, s, RoundDown) + hi = parse_num(T, s, RoundUp) end + is_valid_interval(lo, hi) && return Interval(lo, hi), isnotcom + throw(ArgumentError("input $s can not be parsed as an interval.")) +end - # Not in the standard - pm_interval = Sequence( - any_number, - trim("±"), - any_number - ) do seq - a = parse(T, join(seq[1])) - b = parse(T, join(seq[3])) - return a ± b +""" +Same as `parse(T, s, rounding_mode)`, but also accept string representing rational numbers. +""" +function parse_num(T, s, rounding_mode) + if '/' in s + num, denum = parse.(BigInt, split(s, '/')) + return T(num//denum, rounding_mode) end - - return Sequence( - first, - Either(pm_interval, uncert_interval, infsup_interval, point_interval), - AtEnd() - ) -end \ No newline at end of file + return T(parse(BigFloat, s), rounding_mode) +end diff --git a/test/interval_tests/construction.jl b/test/interval_tests/construction.jl index df9d42157..d8c9a6e91 100644 --- a/test/interval_tests/construction.jl +++ b/test/interval_tests/construction.jl @@ -82,8 +82,6 @@ using Test @test a ⊆ b - @test_throws ArgumentError @interval("[0.1, 0.2") - # TODO Actually use the rounding mode here for rounding in (:wide, :narrow) a = @interval(0.1, 0.2) diff --git a/test/interval_tests/parsing.jl b/test/interval_tests/parsing.jl index f641e0de1..0bbea9542 100644 --- a/test/interval_tests/parsing.jl +++ b/test/interval_tests/parsing.jl @@ -1,67 +1,25 @@ -using IntervalArithmetic -using Test +@testset "parse to Interval{Float32}" begin + I32 = Interval{Float32} + DI32 = DecoratedInterval{Float32} + @test parse(I32, "[1, 2]") === Interval(1f0, 2f0) + @test parse(I32, "[1e-324, 1e400]") === Interval(0f0, Float32(Inf)) + @test parse(I32, "[2,infinity]") === Interval(2f0, Float32(Inf)) + @test parse(I32, "[foobar]") === emptyinterval(Float32) -setformat(:standard, decorations=true, sigfigs=6) + @test parse(DI32, "[1, 2]_com") === DecoratedInterval(Interval(1f0, 2f0), com) + @test isnai(parse(DI32, "[foobar]")) +end -@testset "Parse string to Interval" begin - @test parse(Interval{Float64}, "1") ≛ Interval(1, 1) - @test parse(Interval{Float64}, "[1, 2]") ≛ Interval(1, 2) - @test parse(Interval{Float64}, "[-0x1.3p-1, 2/3]") ≛ Interval(-0x1.3p-1, Float64(2//3, RoundUp)) - @test parse(Interval{Float64}, "[1,+infinity]") ≛ Interval(1.0, Inf) - @test parse(Interval{Float64}, "[1.234e5,Inf]") ≛ Interval(123400.0, Inf) - @test_broken parse(Interval{Float64}, "[]") ≛ ∅ - @test_broken parse(Interval{Float64}, "[,]") ≛ entireinterval(Float64) - @test_broken parse(Interval{Float64}, "[ entire ]") ≛ entireinterval(Float64) - @test parse(Interval{Float64}, "3.56?1") ≛ Interval(0x3.8ccccccccccccp+0, 0x3.91eb851eb8520p+0) - @test parse(Interval{Float64}, "3.56?1e2") ≛ Interval(355.0, 357.0) - @test parse(Interval{Float64}, "3.560?2") ≛ Interval(0x3.8ed916872b020p+0, 0x3.8fdf3b645a1ccp+0) - @test parse(Interval{Float64}, "3.56?") ≛ Interval(0x3.8e147ae147ae0p+0, 0x3.90a3d70a3d70cp+0) - @test parse(Interval{Float64}, "3.560?2u") ≛ Interval(0x3.8f5c28f5c28f4p+0, 0x3.8fdf3b645a1ccp+0) - @test parse(Interval{Float64}, "-10?") ≛ Interval(-10.5, -9.5) - @test parse(Interval{Float64}, "-10?u") ≛ Interval(-10.0, -9.5) - @test parse(Interval{Float64}, "-10?12") ≛ Interval(-22.0, 2.0) - @test parse(Interval{Float64}, "0.0?d") ≛ Interval(-0.05, 0.0) - @test parse(Interval{Float64}, "2.5?d") ≛ Interval(0x1.3999999999999p+1, 2.5) - @test parse(Interval{Float64}, "0.000?5d") ≛ Interval(-0.005, 0.0) - @test parse(Interval{Float64}, "2.500?5d") ≛ Interval(0x1.3f5c28f5c28f5p+1, 2.5) - # NOTE Not in the standard, no sure where it comes from - @test_broken parse(Interval{Float64}, "2.5??d") ≛ Interval(-Inf, 2.5) - @test parse(Interval{Float64}, "2.500?5ue4") ≛ Interval(0x1.86ap+14, 0x1.8768p+14) - @test parse(Interval{Float64}, "2.500?5de-5") ≛ Interval(0x1.a2976f1cee4d5p-16, 0x1.a36e2eb1c432dp-16) - @test parse(Interval{Float64}, "3.1416?1") ≛ Interval(0x3.24395810624dcp+0, 0x3.24467381d7dc0p+0) - @test parse(Interval{BigFloat}, "1") ≛ Interval{BigFloat}(1) - @test parse(Interval{BigFloat}, "[-0x1.3p-1, 2/3]") ≛ Interval{BigFloat}(-0x1.3p-1, BigFloat(2//3, RoundUp)) +@testset "parse to Interval{BigFloat}" begin + BI = Interval{BigFloat} + DBI = DecoratedInterval{BigFloat} - @test_broken parse(Interval{Float64}, "[Empty]") ≛ emptyinterval(Float64) - @test_broken parse(Interval{BigFloat}, "[Empty]") ≛ emptyinterval(BigFloat) + @test parse(BI, "[1, 2]") ≛ Interval(big(1), big(2)) + @test parse(BI, "[1e-400, 2e400]") ≛ Interval(big"1e-400", big"2e400") - @test parse(Interval{Float64}, "3 ± 4") ≛ 3 ± 4 - @test parse(Interval{Float64}, "0.2 ± 0.1") ≛ 0.2 ± 0.1 - @test parse(Interval{BigFloat}, "0.2 ± 0.1") ≛ big"0.2" ± big"0.1" -end + x = parse(DBI, "[1e-400, 1e400]") + _x = DecoratedInterval(big"1e-400", big"1e400", com) + @test x ≛ _x && decoration(x) == decoration(_x) && x isa DecoratedInterval{BigFloat} -@testset "Parse string to DecoratedInterval" begin - @test_broken parse(DecoratedInterval{Float64}, "[ ]") ≛ DecoratedInterval(∅, trv) - @test_broken parse(DecoratedInterval{Float64}, "[entire]") ≛ DecoratedInterval(Interval(-Inf, Inf), dac) - @test_broken parse(DecoratedInterval{Float64}, "[,]") ≛ DecoratedInterval(entireinterval(Float64), dac) - @test_broken isnai(parse(DecoratedInterval{Float64}, "[nai]")) - - @test parse(DecoratedInterval{Float64}, "[3]") ≛ DecoratedInterval(3) - @test parse(DecoratedInterval{Float64}, "[3, 4]") ≛ DecoratedInterval(3, 4) - @test parse(DecoratedInterval{Float64}, "[3, 4]_dac") ≛ DecoratedInterval(3, 4, dac) - - @test parse(DecoratedInterval{Float64}, "3.56?1") ≛ DecoratedInterval(Interval(0x3.8ccccccccccccp+0, 0x3.91eb851eb8520p+0), com) - @test parse(DecoratedInterval{Float64}, "3.56?1e2") ≛ DecoratedInterval(Interval(355.0, 357.0), com) - @test parse(DecoratedInterval{Float64}, "3.560?2") ≛ DecoratedInterval(Interval(0x3.8ed916872b020p+0, 0x3.8fdf3b645a1ccp+0), com) - @test parse(DecoratedInterval{Float64}, "3.56?") ≛ DecoratedInterval(Interval(0x3.8e147ae147ae0p+0, 0x3.90a3d70a3d70cp+0), com) - @test parse(DecoratedInterval{Float64}, "3.56?e2") ≛ DecoratedInterval(Interval(3.555e2, 3.565e2), com) - @test parse(DecoratedInterval{Float64}, "3.560?2u") ≛ DecoratedInterval(Interval(0x3.8f5c28f5c28f4p+0, 0x3.8fdf3b645a1ccp+0), com) - @test parse(DecoratedInterval{Float64}, "-10?") ≛ DecoratedInterval(Interval(-10.5, -9.5), com) - @test parse(DecoratedInterval{Float64}, "-10?e2") ≛ DecoratedInterval(Interval(-10.5e2, -9.5e2), com) - @test parse(DecoratedInterval{Float64}, "-10?u") ≛ DecoratedInterval(Interval(-10.0, -9.5), com) - @test parse(DecoratedInterval{Float64}, "-10?12") ≛ DecoratedInterval(Interval(-22.0, 2.0), com) - @test_broken parse(DecoratedInterval{Float64}, "-10??u") ≛ DecoratedInterval(Interval(-10.0, Inf), dac) - @test_broken parse(DecoratedInterval{Float64}, "-10??") ≛ DecoratedInterval(Interval(-Inf, Inf), dac) - @test parse(DecoratedInterval{Float64}, "3.56?1_def") ≛ DecoratedInterval(Interval(0x3.8ccccccccccccp+0, 0x3.91eb851eb8520p+0), def) end diff --git a/test/test_ITF1788/ieee1788-constructors.jl b/test/test_ITF1788/ieee1788-constructors.jl old mode 100644 new mode 100755 index 80c2216b7..0758d7a05 --- a/test/test_ITF1788/ieee1788-constructors.jl +++ b/test/test_ITF1788/ieee1788-constructors.jl @@ -48,29 +48,29 @@ end @test @interval("3.1416?1") === Interval(0x3.24395810624DCP+0, 0x3.24467381D7DC0P+0) - @test_skip @interval("[Empty]") === emptyinterval() + @test @interval("[Empty]") === emptyinterval() end @testset "IEEE1788.e" begin - @test_logs (:warn, ) @test isnai(DecoratedInterval(2,1)) + @test isnai(DecoratedInterval(2,1)) end @testset "IEEE1788.e" begin - @test_skip @decorated("[ ]") === DecoratedInterval(emptyinterval(), trv) + @test @decorated("[ ]") === DecoratedInterval(emptyinterval(), trv) - @test_skip @decorated("[entire]") === DecoratedInterval(Interval(-Inf, +Inf), dac) + @test @decorated("[entire]") === DecoratedInterval(Interval(-Inf, +Inf), dac) @test @decorated("[1.e-3, 1.1e-3]") === DecoratedInterval(Interval(0x4.189374BC6A7ECP-12, 0x4.816F0068DB8BCP-12), com) @test @decorated("[-Inf, 2/3]") === DecoratedInterval(Interval(-Inf, +0xA.AAAAAAAAAAAB0P-4), dac) - @test_skip @decorated("[0x1.3p-1,]") === DecoratedInterval(Interval(0x1.3p-1, Inf), dac) + @test @decorated("[0x1.3p-1,]") === DecoratedInterval(Interval(0x1.3p-1, Inf), dac) - @test_skip @decorated("[,]") === DecoratedInterval(entireinterval(), dac) + @test @decorated("[,]") === DecoratedInterval(entireinterval(), dac) @test @decorated("3.56?1") === DecoratedInterval(Interval(0x3.8CCCCCCCCCCCCP+0, 0x3.91EB851EB8520P+0), com) @@ -88,11 +88,11 @@ end @test @decorated("-10?12") === DecoratedInterval(Interval(-22.0, 2.0), com) - @test_skip @decorated("-10??u") === DecoratedInterval(Interval(-10.0, Inf), dac) + @test @decorated("-10??u") === DecoratedInterval(Interval(-10.0, Inf), dac) - @test_skip @decorated("-10??") === DecoratedInterval(Interval(-Inf, Inf), dac) + @test @decorated("-10??") === DecoratedInterval(Interval(-Inf, Inf), dac) - @test_skip isnai(@decorated("[nai]")) + @test isnai(@decorated("[nai]")) @test @decorated("3.56?1_def") === DecoratedInterval(Interval(0x3.8CCCCCCCCCCCCP+0, 0x3.91EB851EB8520P+0), def) @@ -100,15 +100,14 @@ end @testset "IEEE1788.f" begin - @test_skip @interval("[]") === emptyinterval() + @test @interval("[]") === emptyinterval() - @test_skip @interval("[empty]") === emptyinterval() + @test @interval("[empty]") === emptyinterval() - @test_skip @interval("[ empty ]") === emptyinterval() + @test @interval("[ empty ]") === emptyinterval() - @test_skip @interval("[,]") === entireinterval() + @test @interval("[,]") === entireinterval() - @test_skip @interval("[ entire ]") === entireinterval() + @test @interval("[ entire ]") === entireinterval() end - diff --git a/test/test_ITF1788/ieee1788-exceptions.jl b/test/test_ITF1788/ieee1788-exceptions.jl old mode 100644 new mode 100755 index 6e6e2a599..bfb314fff --- a/test/test_ITF1788/ieee1788-exceptions.jl +++ b/test/test_ITF1788/ieee1788-exceptions.jl @@ -1,12 +1,12 @@ @testset "exceptions" begin - @test_logs (:warn, ) @test @interval("[+infinity]") === emptyinterval() + @test @interval("[+infinity]") === emptyinterval() - @test_logs (:warn, ) @test interval(+Inf,-Inf) === emptyinterval() + @test interval(+Inf,-Inf) === emptyinterval() - @test_logs (:warn, ) @test_skip interval(nai()) === emptyinterval() + @test_broken interval(nai()) === emptyinterval() - @test_logs (:warn, ) @test @interval("[1.0000000000000001, 1.0000000000000002]") === Interval(1.0, 0x1.0000000000001p+0) + @test @interval("[1.0000000000000001, 1.0000000000000002]") === Interval(1.0, 0x1.0000000000001p+0) end diff --git a/test/test_ITF1788/libieeep1788_class.jl b/test/test_ITF1788/libieeep1788_class.jl old mode 100644 new mode 100755 index a7a35b124..32a615d45 --- a/test/test_ITF1788/libieeep1788_class.jl +++ b/test/test_ITF1788/libieeep1788_class.jl @@ -8,13 +8,13 @@ @test interval(-Inf,Inf) === Interval(-Inf,Inf) - @test_logs (:warn, ) @test interval(NaN,NaN) === emptyinterval() + @test interval(NaN,NaN) === emptyinterval() - @test_logs (:warn, ) @test interval(1.0,-1.0) === emptyinterval() + @test interval(1.0,-1.0) === emptyinterval() - @test_logs (:warn, ) @test interval(-Inf,-Inf) === emptyinterval() + @test interval(-Inf,-Inf) === emptyinterval() - @test_logs (:warn, ) @test interval(Inf,Inf) === emptyinterval() + @test interval(Inf,Inf) === emptyinterval() end @@ -28,39 +28,39 @@ end @test DecoratedInterval(-Inf,Inf) === DecoratedInterval(Interval(-Inf,Inf), dac) - @test_logs (:warn, ) @test isnai(DecoratedInterval(NaN,NaN)) + @test isnai(DecoratedInterval(NaN,NaN)) - @test_logs (:warn, ) @test isnai(DecoratedInterval(1.0,-1.0)) + @test isnai(DecoratedInterval(1.0,-1.0)) - @test_logs (:warn, ) @test isnai(DecoratedInterval(-Inf,-Inf)) + @test isnai(DecoratedInterval(-Inf,-Inf)) - @test_logs (:warn, ) @test isnai(DecoratedInterval(Inf,Inf)) + @test isnai(DecoratedInterval(Inf,Inf)) end @testset "minimal_text_to_interval_test" begin - @test_skip @interval("[ Empty ]") === emptyinterval() + @test @interval("[ Empty ]") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ Empty ]_trv") === emptyinterval() + @test @interval("[ Empty ]_trv") === emptyinterval() - @test_skip @interval("[ ]") === emptyinterval() + @test @interval("[ ]") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ ]_trv") === emptyinterval() + @test @interval("[ ]_trv") === emptyinterval() - @test_skip @interval("[,]") === Interval(-Inf,Inf) + @test @interval("[,]") === Interval(-Inf,Inf) - @test_logs (:warn, ) @test_skip @interval("[,]_trv") === emptyinterval() + @test @interval("[,]_trv") === emptyinterval() - @test_skip @interval("[ entire ]") === Interval(-Inf,Inf) + @test @interval("[ entire ]") === Interval(-Inf,Inf) - @test_logs (:warn, ) @test_skip @interval("[ ENTIRE ]_dac") === emptyinterval() + @test @interval("[ ENTIRE ]_dac") === emptyinterval() - @test_skip @interval("[ ENTIRE ]") === Interval(-Inf,Inf) + @test @interval("[ ENTIRE ]") === Interval(-Inf,Inf) @test @interval("[ -inf , INF ]") === Interval(-Inf,Inf) - @test_logs (:warn, ) @test_skip @interval("[ -inf, INF ]_def") === emptyinterval() + @test @interval("[ -inf, INF ]_def") === emptyinterval() @test @interval("[-1.0,1.0]") === Interval(-1.0,1.0) @@ -68,7 +68,7 @@ end @test @interval("[ -1.0 , 1.0]") === Interval(-1.0,1.0) - @test_skip @interval("[-1,]") === Interval(-1.0,Inf) + @test @interval("[-1,]") === Interval(-1.0,Inf) @test @interval("[-1.0, +inf]") === Interval(-1.0,Inf) @@ -108,19 +108,19 @@ end @test @interval("2.500?5d") === Interval(0x1.3f5c28f5c28f5p+1,2.5) - @test_skip @interval("0.0??") === Interval(-Inf,Inf) + @test @interval("0.0??") === Interval(-Inf,Inf) - @test_skip @interval("0.0??u") === Interval(0.0,Inf) + @test @interval("0.0??u") === Interval(0.0,Inf) - @test_skip @interval("0.0??d") === Interval(-Inf,0.0) + @test @interval("0.0??d") === Interval(-Inf,0.0) - @test_skip @interval("2.5??") === Interval(-Inf,Inf) + @test @interval("2.5??") === Interval(-Inf,Inf) - @test_skip @interval("2.5??u") === Interval(2.5,Inf) + @test @interval("2.5??u") === Interval(2.5,Inf) - @test_skip @interval("2.5??d") === Interval(-Inf,2.5) + @test @interval("2.5??d") === Interval(-Inf,2.5) - @test_skip @interval("2.500?5e+27") === Interval(0x1.01fa19a08fe7fp+91,0x1.0302cc4352683p+91) + @test @interval("2.500?5e+27") === Interval(0x1.01fa19a08fe7fp+91,0x1.0302cc4352683p+91) @test @interval("2.500?5ue4") === Interval(0x1.86ap+14,0x1.8768p+14) @@ -128,73 +128,73 @@ end @test @interval("10?3") === Interval(7.0,13.0) - @test_skip @interval("10?3e380") === Interval(0x1.fffffffffffffp+1023,Inf) + @test @interval("10?3e380") === Interval(0x1.fffffffffffffp+1023,Inf) @test @interval("1.0000000000000001?1") === Interval(1.0,0x1.0000000000001p+0) - @test_skip @interval("10?1800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") === Interval(-Inf,Inf) + @test @interval("10?1800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") === Interval(-Inf,Inf) - @test_logs (:warn, ) @test_skip @interval("[ Nai ]") === emptyinterval() + @test @interval("[ Nai ]") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ Nai ]_ill") === emptyinterval() + @test @interval("[ Nai ]_ill") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ Nai ]_trv") === emptyinterval() + @test @interval("[ Nai ]_trv") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ Empty ]_ill") === emptyinterval() + @test @interval("[ Empty ]_ill") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ ]_com") === emptyinterval() + @test @interval("[ ]_com") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[,]_com") === emptyinterval() + @test @interval("[,]_com") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ Entire ]_com") === emptyinterval() + @test @interval("[ Entire ]_com") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ -inf , INF ]_com") === emptyinterval() + @test @interval("[ -inf , INF ]_com") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ -1.0 , 1.0]_ill") === emptyinterval() + @test @interval("[ -1.0 , 1.0]_ill") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ -1.0 , 1.0]_fooo") === emptyinterval() + @test @interval("[ -1.0 , 1.0]_fooo") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ -1.0 , 1.0]_da") === emptyinterval() + @test @interval("[ -1.0 , 1.0]_da") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[-1.0,]_com") === emptyinterval() + @test @interval("[-1.0,]_com") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[-Inf, 1.000 ]_ill") === emptyinterval() + @test @interval("[-Inf, 1.000 ]_ill") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[-I nf, 1.000 ]") === emptyinterval() + @test @interval("[-I nf, 1.000 ]") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[-Inf, 1.0 00 ]") === emptyinterval() + @test @interval("[-Inf, 1.0 00 ]") === emptyinterval() - @test_logs (:warn, ) @test @interval("[-Inf ]") === emptyinterval() + @test @interval("[-Inf ]") === emptyinterval() - @test_logs (:warn, ) @test @interval("[Inf , INF]") === emptyinterval() + @test @interval("[Inf , INF]") === emptyinterval() - @test_logs (:warn, ) @test_skip @interval("[ foo ]") === emptyinterval() + @test @interval("[ foo ]") === emptyinterval() - @test_logs (:warn, ) @test @interval("[1.0000000000000002,1.0000000000000001]") === Interval(1.0,0x1.0000000000001p+0) + @test @interval("[1.0000000000000002,1.0000000000000001]") === Interval(1.0,0x1.0000000000001p+0) - @test_logs (:warn, ) @test @interval("[10000000000000001/10000000000000000,10000000000000002/10000000000000001]") === Interval(1.0,0x1.0000000000001p+0) + @test @interval("[10000000000000001/10000000000000000,10000000000000002/10000000000000001]") === Interval(1.0,0x1.0000000000001p+0) - @test_logs (:warn, ) @test @interval("[0x1.00000000000002p0,0x1.00000000000001p0]") === Interval(1.0,0x1.0000000000001p+0) + @test @interval("[0x1.00000000000002p0,0x1.00000000000001p0]") === Interval(1.0,0x1.0000000000001p+0) end @testset "minimal_text_to_decorated_interval_test" begin - @test_skip @decorated("[ Empty ]") === DecoratedInterval(emptyinterval(), trv) + @test @decorated("[ Empty ]") === DecoratedInterval(emptyinterval(), trv) - @test_skip @decorated("[ Empty ]_trv") === DecoratedInterval(emptyinterval(), trv) + @test @decorated("[ Empty ]_trv") === DecoratedInterval(emptyinterval(), trv) - @test_skip @decorated("[ ]") === DecoratedInterval(emptyinterval(), trv) + @test @decorated("[ ]") === DecoratedInterval(emptyinterval(), trv) - @test_skip @decorated("[ ]_trv") === DecoratedInterval(emptyinterval(), trv) + @test @decorated("[ ]_trv") === DecoratedInterval(emptyinterval(), trv) - @test_skip @decorated("[,]") === DecoratedInterval(entireinterval(), dac) + @test @decorated("[,]") === DecoratedInterval(entireinterval(), dac) - @test_skip @decorated("[,]_trv") === DecoratedInterval(entireinterval(), trv) + @test @decorated("[,]_trv") === DecoratedInterval(entireinterval(), trv) - @test_skip @decorated("[ entire ]") === DecoratedInterval(entireinterval(), dac) + @test @decorated("[ entire ]") === DecoratedInterval(entireinterval(), dac) - @test_skip @decorated("[ ENTIRE ]_dac") === DecoratedInterval(entireinterval(), dac) + @test @decorated("[ ENTIRE ]_dac") === DecoratedInterval(entireinterval(), dac) @test @decorated("[ -inf , INF ]") === DecoratedInterval(entireinterval(), dac) @@ -206,7 +206,7 @@ end @test @decorated("[ -1.0 , 1.0]_trv") === DecoratedInterval(Interval(-1.0,1.0), trv) - @test_skip @decorated("[-1,]") === DecoratedInterval(Interval(-1.0,Inf), dac) + @test @decorated("[-1,]") === DecoratedInterval(Interval(-1.0,Inf), dac) @test @decorated("[-1.0, +inf]_def") === DecoratedInterval(Interval(-1.0,Inf), def) @@ -216,7 +216,7 @@ end @test @decorated("[-Infinity, 1.000 ]_trv") === DecoratedInterval(Interval(-Inf,1.0), trv) - @test_skip @decorated("[1.0E+400 ]_com") === DecoratedInterval(Interval(0x1.fffffffffffffp+1023,Inf), dac) + @test @decorated("[1.0E+400 ]_com") === DecoratedInterval(Interval(0x1.fffffffffffffp+1023,Inf), dac) @test @decorated("[ -4/2, 10/5 ]_com") === DecoratedInterval(Interval(-2.0,2.0), com) @@ -246,81 +246,81 @@ end @test @decorated("2.500?5d") === DecoratedInterval(Interval(0x1.3f5c28f5c28f5p+1,2.5), com) - @test_skip @decorated("0.0??_dac") === DecoratedInterval(Interval(-Inf,Inf), dac) + @test @decorated("0.0??_dac") === DecoratedInterval(Interval(-Inf,Inf), dac) - @test_skip @decorated("0.0??u_trv") === DecoratedInterval(Interval(0.0,Inf), trv) + @test @decorated("0.0??u_trv") === DecoratedInterval(Interval(0.0,Inf), trv) - @test_skip @decorated("0.0??d") === DecoratedInterval(Interval(-Inf,0.0), dac) + @test @decorated("0.0??d") === DecoratedInterval(Interval(-Inf,0.0), dac) - @test_skip @decorated("2.5??") === DecoratedInterval(Interval(-Inf,Inf), dac) + @test @decorated("2.5??") === DecoratedInterval(Interval(-Inf,Inf), dac) - @test_skip @decorated("2.5??u_def") === DecoratedInterval(Interval(2.5,Inf), def) + @test @decorated("2.5??u_def") === DecoratedInterval(Interval(2.5,Inf), def) - @test_skip @decorated("2.5??d_dac") === DecoratedInterval(Interval(-Inf,2.5), dac) + @test @decorated("2.5??d_dac") === DecoratedInterval(Interval(-Inf,2.5), dac) - @test_skip @decorated("2.500?5e+27") === DecoratedInterval(Interval(0x1.01fa19a08fe7fp+91,0x1.0302cc4352683p+91), com) + @test @decorated("2.500?5e+27") === DecoratedInterval(Interval(0x1.01fa19a08fe7fp+91,0x1.0302cc4352683p+91), com) @test @decorated("2.500?5ue4_def") === DecoratedInterval(Interval(0x1.86ap+14,0x1.8768p+14), def) @test @decorated("2.500?5de-5") === DecoratedInterval(Interval(0x1.a2976f1cee4d5p-16,0x1.a36e2eb1c432dp-16), com) - @test_skip isnai(@decorated("[ Nai ]")) + @test isnai(@decorated("[ Nai ]")) - @test_skip @decorated("10?1800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000_com") === DecoratedInterval(Interval(-Inf,Inf), dac) + @test @decorated("10?1800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000_com") === DecoratedInterval(Interval(-Inf,Inf), dac) @test @decorated("10?3_com") === DecoratedInterval(Interval(7.0,13.0), com) - @test_skip @decorated("10?3e380_com") === DecoratedInterval(Interval(0x1.fffffffffffffp+1023,Inf), dac) + @test @decorated("10?3e380_com") === DecoratedInterval(Interval(0x1.fffffffffffffp+1023,Inf), dac) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ Nai ]_ill")) + @test isnai(@decorated("[ Nai ]_ill")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ Nai ]_trv")) + @test isnai(@decorated("[ Nai ]_trv")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ Empty ]_ill")) + @test isnai(@decorated("[ Empty ]_ill")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ ]_com")) + @test isnai(@decorated("[ ]_com")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[,]_com")) + @test isnai(@decorated("[,]_com")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ Entire ]_com")) + @test isnai(@decorated("[ Entire ]_com")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ -inf , INF ]_com")) + @test isnai(@decorated("[ -inf , INF ]_com")) - @test_logs (:warn, ) @test isnai(@decorated("[ -1.0 , 1.0]_ill")) + @test isnai(@decorated("[ -1.0 , 1.0]_ill")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ -1.0 , 1.0]_fooo")) + @test isnai(@decorated("[ -1.0 , 1.0]_fooo")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ -1.0 , 1.0]_da")) + @test isnai(@decorated("[ -1.0 , 1.0]_da")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[-1.0,]_com")) + @test isnai(@decorated("[-1.0,]_com")) - @test_logs (:warn, ) @test isnai(@decorated("[-Inf, 1.000 ]_ill")) + @test isnai(@decorated("[-Inf, 1.000 ]_ill")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[-I nf, 1.000 ]")) + @test isnai(@decorated("[-I nf, 1.000 ]")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[-Inf, 1.0 00 ]")) + @test isnai(@decorated("[-Inf, 1.0 00 ]")) - @test_logs (:warn, ) @test isnai(@decorated("[-Inf ]")) + @test isnai(@decorated("[-Inf ]")) - @test_logs (:warn, ) @test isnai(@decorated("[Inf , INF]")) + @test isnai(@decorated("[Inf , INF]")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[ foo ]")) + @test isnai(@decorated("[ foo ]")) - @test_logs (:warn, ) @test_skip isnai(@decorated("0.0??_com")) + @test isnai(@decorated("0.0??_com")) - @test_logs (:warn, ) @test_skip isnai(@decorated("0.0??u_ill")) + @test isnai(@decorated("0.0??u_ill")) - @test_logs (:warn, ) @test_skip isnai(@decorated("0.0??d_com")) + @test isnai(@decorated("0.0??d_com")) - @test_logs (:warn, ) @test_skip isnai(@decorated("0.0??_com")) + @test isnai(@decorated("0.0??_com")) - @test_logs (:warn, ) @test_skip isnai(@decorated("[1.0,2.0")) + @test isnai(@decorated("[1.0,2.0")) - @test_logs (:warn, ) @test @decorated("[1.0000000000000002,1.0000000000000001]") === DecoratedInterval(Interval(1.0,0x1.0000000000001p+0), com) + @test @decorated("[1.0000000000000002,1.0000000000000001]") === DecoratedInterval(Interval(1.0,0x1.0000000000001p+0), com) - @test_logs (:warn, ) @test @decorated("[10000000000000001/10000000000000000,10000000000000002/10000000000000001]") === DecoratedInterval(Interval(1.0,0x1.0000000000001p+0), com) + @test @decorated("[10000000000000001/10000000000000000,10000000000000002/10000000000000001]") === DecoratedInterval(Interval(1.0,0x1.0000000000001p+0), com) - @test_logs (:warn, ) @test @decorated("[0x1.00000000000002p0,0x1.00000000000001p0]") === DecoratedInterval(Interval(1.0,0x1.0000000000001p+0), com) + @test @decorated("[0x1.00000000000002p0,0x1.00000000000001p0]") === DecoratedInterval(Interval(1.0,0x1.0000000000001p+0), com) end @@ -352,7 +352,7 @@ end @test interval(DecoratedInterval(interval(-0x1.99999C0000000p+4,0x1.9999999999999P-4), com)) === Interval(-0x1.99999C0000000p+4,0x1.9999999999999P-4) - @test_logs (:warn, ) @test_skip interval(nai()) === emptyinterval() + @test_broken interval(nai()) === emptyinterval() end @@ -414,23 +414,23 @@ end @test DecoratedInterval(interval(-0x1.99999C0000000p+4,0x1.9999999999999P-4), com) === DecoratedInterval(Interval(-0x1.99999C0000000p+4,0x1.9999999999999P-4), com) - @test_skip DecoratedInterval(emptyinterval(), def) === DecoratedInterval(emptyinterval(), trv) + @test_broken DecoratedInterval(emptyinterval(), def) === DecoratedInterval(emptyinterval(), trv) - @test_skip DecoratedInterval(emptyinterval(), dac) === DecoratedInterval(emptyinterval(), trv) + @test_broken DecoratedInterval(emptyinterval(), dac) === DecoratedInterval(emptyinterval(), trv) - @test_skip DecoratedInterval(emptyinterval(), com) === DecoratedInterval(emptyinterval(), trv) + @test_broken DecoratedInterval(emptyinterval(), com) === DecoratedInterval(emptyinterval(), trv) - @test_skip DecoratedInterval(interval(1.0,Inf), com) === DecoratedInterval(Interval(1.0,Inf), dac) + @test_broken DecoratedInterval(interval(1.0,Inf), com) === DecoratedInterval(Interval(1.0,Inf), dac) - @test_skip DecoratedInterval(interval(-Inf,3.0), com) === DecoratedInterval(Interval(-Inf,3.0), dac) + @test_broken DecoratedInterval(interval(-Inf,3.0), com) === DecoratedInterval(Interval(-Inf,3.0), dac) - @test_skip DecoratedInterval(interval(-Inf,Inf), com) === DecoratedInterval(Interval(-Inf,Inf), dac) + @test_broken DecoratedInterval(interval(-Inf,Inf), com) === DecoratedInterval(Interval(-Inf,Inf), dac) - @test_logs (:warn, ) @test isnai(DecoratedInterval(emptyinterval(), ill)) + @test isnai(DecoratedInterval(emptyinterval(), ill)) - @test_logs (:warn, ) @test isnai(DecoratedInterval(interval(-Inf,3.0), ill)) + @test isnai(DecoratedInterval(interval(-Inf,3.0), ill)) - @test_logs (:warn, ) @test isnai(DecoratedInterval(interval(-1.0,3.0), ill)) + @test isnai(DecoratedInterval(interval(-1.0,3.0), ill)) end diff --git a/test/test_ITF1788/libieeep1788_reduction.jl b/test/test_ITF1788/libieeep1788_reduction.jl old mode 100644 new mode 100755 index 302d1fe33..e8ff50ff6 --- a/test/test_ITF1788/libieeep1788_reduction.jl +++ b/test/test_ITF1788/libieeep1788_reduction.jl @@ -32,7 +32,7 @@ end @test dot([1.0, 2.0, 3.0], [1.0, 2.0, 3.0]) === 14.0 - @test_skip dot([0x10000000000001p0, 0x1p104], [0x0fffffffffffffp0, -1.0]) === -1.0 + @test_broken dot([0x10000000000001p0, 0x1p104], [0x0fffffffffffffp0, -1.0]) === -1.0 @test isnan(dot([1.0, 2.0, NaN, 3.0], [1.0, 2.0, 3.0, 4.0])) diff --git a/test/test_ITF1788/run_ITF1788.jl b/test/test_ITF1788/run_ITF1788.jl index 206a59024..a0fd71f00 100644 --- a/test/test_ITF1788/run_ITF1788.jl +++ b/test/test_ITF1788/run_ITF1788.jl @@ -14,8 +14,9 @@ include("libieeep1788_reduction.jl") include("libieeep1788_set.jl") include("mpfi.jl") -using IntervalContractors -include("abs_rev.jl") -include("libieeep1788_rev.jl") -include("libieeep1788_mul_rev.jl") -include("pow_rev.jl") +# TODO: CHECK CONTRACTORS +# using IntervalContractors +# include("abs_rev.jl") +# include("libieeep1788_rev.jl") +# include("libieeep1788_mul_rev.jl") +# include("pow_rev.jl")