Skip to content

Rework test suite - #775

Open
OlivierHnt wants to merge 21 commits into
JuliaIntervals:masterfrom
OlivierHnt:rework-test-suite
Open

Rework test suite#775
OlivierHnt wants to merge 21 commits into
JuliaIntervals:masterfrom
OlivierHnt:rework-test-suite

Conversation

@OlivierHnt

Copy link
Copy Markdown
Member

Complete rework of the test suite, and fixes for the bugs it surfaced in src/.

Test suite

  • test/ now mirrors the organization of src/ and ext/. Every extension is covered (DiffRules, IntervalSets, Makie, RecipesBase and SparseArrays previously had no tests). The legacy test/interval_tests/ is removed, and every assertion was preserved or strengthened.
  • ITF1788: the reductions are translated with correctly rounded accumulation, removing the dot_nearest @test_broken. The atan2 override is also removed, since the original ITL expectation dac is correct and now passes.
  • Aqua tests reworked. The cross-dependency ambiguity check no longer depends on which packages earlier test files load.

Fixes in src/

  • Two-argument atan: the decoration of a box touching the branch cut from above is capped at dac, since com requires continuity at each point of the box.
    julia> decoration(atan(interval(0.0, 1.0), interval(-2.0, -1.0)))
    dac # was com
  • acot: uses the convention acot(0) = π/2, with the jump at 0 decorated like the branch cut of the two-argument atan. An explicit method for Interval replaces the Base fallback atan(inv(x)).
    julia> acot(interval(0))
    [1.57079, 1.5708]_dac # was ∅_trv
  • :ulp rounding mode: functions without a CoreMath routine (cot, sec, csc, acot, coth, sech, csch, acoth) fall back to the :correct implementation.
    julia> IntervalArithmetic.configure(rounding = :ulp);
    
    julia> cot(interval(0.5))
    [1.83048, 1.83049]_com # was UndefVarError
  • Piecewise:
    • the constructor throws the intended ArgumentErrors on mismatched numbers of domains, functions or junctions (was MethodError or UndefVarError).
    • in_domain is rewritten. It wrongly returned false for inputs starting at a closed endpoint or lying in a later piece.
      julia> pgap = Piecewise(Domain{:closed,:closed}(0, 1) => Constant(1.0), Domain{:closed,:closed}(2, 3) => Constant(2.0));
      
      julia> decoration(pgap(interval(2.2, 2.5)))
      com # was trv
    • isguaranteed propagation: Piecewise and Constant no longer return guaranteed intervals from non-guaranteed inputs.
      julia> isguaranteed(pgap(convert(Interval{Float64}, 0.5)))
      false # was true
    • intersect_domain: at equal endpoint values, an open bound now wins ([0,1] ∩ [0,1) is [0,1)).
    • Domain bound validation throws ArgumentError (was ErrorException). Dead helpers removed and docstrings corrected.

🤖 Generated with Claude Code

OlivierHnt and others added 5 commits August 24, 2026 13:15
… cut

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@OlivierHnt OlivierHnt linked an issue Aug 24, 2026 that may be closed by this pull request
@OlivierHnt

Copy link
Copy Markdown
Member Author

@Kolaru can you look closely at the changes in piecewise.jl? It looked fine to me, but since I do not use this feature I cannot tell for sure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master c7e3f8a... master / c7e3f8a...
BigFloat MPFI/basics/* 25.5 ± 3.6 μs 25 ± 3.7 μs 1.02 ± 0.21
BigFloat MPFI/basics/+ 12.1 ± 3.6 μs 12.5 ± 3.6 μs 0.969 ± 0.4
BigFloat MPFI/basics/- 17.6 ± 3.4 μs 17.7 ± 3.3 μs 0.994 ± 0.27
BigFloat MPFI/basics// 19.3 ± 3.6 μs 19 ± 3.6 μs 1.01 ± 0.27
BigFloat MPFI/basics/abs 10.2 ± 3.5 μs 10.2 ± 3.5 μs 0.997 ± 0.48
BigFloat MPFI/basics/acos 0.677 ± 0.0091 ms 0.677 ± 0.0092 ms 1 ± 0.019
BigFloat MPFI/basics/asin 0.658 ± 0.01 ms 0.658 ± 0.011 ms 1 ± 0.023
BigFloat MPFI/basics/atan 2.1 ± 0.0078 ms 2.1 ± 0.0092 ms 0.998 ± 0.0057
BigFloat MPFI/basics/cos 0.359 ± 0.01 ms 0.359 ± 0.01 ms 1 ± 0.04
BigFloat MPFI/basics/cosh 0.431 ± 0.012 ms 0.435 ± 0.012 ms 0.99 ± 0.038
BigFloat MPFI/basics/exp 0.503 ± 0.01 ms 0.508 ± 0.01 ms 0.99 ± 0.029
BigFloat MPFI/basics/inv 18.7 ± 3.5 μs 18.5 ± 3.5 μs 1.01 ± 0.27
BigFloat MPFI/basics/log 0.469 ± 0.011 ms 0.471 ± 0.011 ms 0.996 ± 0.033
BigFloat MPFI/basics/sin 0.462 ± 0.012 ms 0.463 ± 0.011 ms 0.997 ± 0.036
BigFloat MPFI/basics/sinh 0.574 ± 0.01 ms 0.579 ± 0.01 ms 0.991 ± 0.025
BigFloat MPFI/basics/sqrt 27.3 ± 6.9 μs 28 ± 7.3 μs 0.976 ± 0.35
BigFloat MPFI/basics/tan 0.384 ± 0.01 ms 0.385 ± 0.01 ms 0.997 ± 0.038
BigFloat MPFI/basics/tanh 0.586 ± 0.011 ms 0.591 ± 0.011 ms 0.99 ± 0.025
BigFloat bareinterval/basics/* 0.0394 ± 0.0023 ms 0.0398 ± 0.0024 ms 0.99 ± 0.082
BigFloat bareinterval/basics/+ 22 ± 3.4 μs 22.3 ± 3.4 μs 0.984 ± 0.21
BigFloat bareinterval/basics/- 22 ± 3.4 μs 22.1 ± 3.3 μs 0.997 ± 0.21
BigFloat bareinterval/basics// 20 ± 5.3 μs 19.6 ± 5.2 μs 1.02 ± 0.38
BigFloat bareinterval/basics/abs 15.5 ± 3.2 μs 15.2 ± 3.2 μs 1.01 ± 0.3
BigFloat bareinterval/basics/acos 0.707 ± 0.023 ms 0.709 ± 0.025 ms 0.997 ± 0.048
BigFloat bareinterval/basics/asin 0.693 ± 0.021 ms 0.693 ± 0.022 ms 1 ± 0.043
BigFloat bareinterval/basics/atan 2.11 ± 0.0074 ms 2.13 ± 0.0095 ms 0.989 ± 0.0056
BigFloat bareinterval/basics/cos 0.344 ± 0.086 ms 0.345 ± 0.088 ms 0.997 ± 0.36
BigFloat bareinterval/basics/cosh 0.474 ± 0.024 ms 0.478 ± 0.024 ms 0.992 ± 0.07
BigFloat bareinterval/basics/exp 0.515 ± 0.01 ms 0.519 ± 0.011 ms 0.991 ± 0.028
BigFloat bareinterval/basics/inv 26.1 ± 3.5 μs 26 ± 3.3 μs 1 ± 0.18
BigFloat bareinterval/basics/log 0.504 ± 0.012 ms 0.503 ± 0.013 ms 1 ± 0.035
BigFloat bareinterval/basics/sin 0.49 ± 0.097 ms 0.532 ± 0.096 ms 0.921 ± 0.25
BigFloat bareinterval/basics/sinh 0.583 ± 0.011 ms 0.589 ± 0.011 ms 0.99 ± 0.027
BigFloat bareinterval/basics/sqrt 0.0322 ± 0.0023 ms 0.0322 ± 0.0021 ms 1 ± 0.098
BigFloat bareinterval/basics/tan 0.327 ± 0.057 ms 0.315 ± 0.058 ms 1.04 ± 0.26
BigFloat bareinterval/basics/tanh 0.595 ± 0.011 ms 0.601 ± 0.011 ms 0.991 ± 0.026
BigFloat interval/basics/* 0.0427 ± 0.0019 ms 0.0428 ± 0.002 ms 0.997 ± 0.065
BigFloat interval/basics/+ 24.2 ± 8.5 μs 24.8 ± 8.5 μs 0.976 ± 0.48
BigFloat interval/basics/- 24.4 ± 8.4 μs 24.9 ± 8.3 μs 0.977 ± 0.47
BigFloat interval/basics// 24.3 ± 4.9 μs 24.3 ± 5 μs 0.999 ± 0.29
BigFloat interval/basics/abs 14.4 ± 7.8 μs 14.2 ± 7.7 μs 1.01 ± 0.77
BigFloat interval/basics/acos 0.703 ± 0.04 ms 0.705 ± 0.042 ms 0.998 ± 0.082
BigFloat interval/basics/asin 0.685 ± 0.034 ms 0.688 ± 0.034 ms 0.997 ± 0.07
BigFloat interval/basics/atan 2.11 ± 0.0067 ms 2.13 ± 0.0085 ms 0.99 ± 0.0051
BigFloat interval/basics/cos 0.337 ± 0.014 ms 0.34 ± 0.015 ms 0.99 ± 0.06
BigFloat interval/basics/cosh 0.47 ± 0.023 ms 0.475 ± 0.023 ms 0.99 ± 0.068
BigFloat interval/basics/exp 0.523 ± 0.01 ms 0.529 ± 0.01 ms 0.988 ± 0.027
BigFloat interval/basics/inv 30.4 ± 7 μs 30.3 ± 7.4 μs 1 ± 0.34
BigFloat interval/basics/log 0.504 ± 0.036 ms 0.504 ± 0.036 ms 0.999 ± 0.1
BigFloat interval/basics/sin 0.486 ± 0.018 ms 0.492 ± 0.019 ms 0.988 ± 0.053
BigFloat interval/basics/sinh 0.591 ± 0.01 ms 0.598 ± 0.011 ms 0.988 ± 0.025
BigFloat interval/basics/sqrt 0.0401 ± 0.029 ms 0.0403 ± 0.03 ms 0.995 ± 1
BigFloat interval/basics/tan 0.282 ± 0.015 ms 0.284 ± 0.015 ms 0.993 ± 0.075
BigFloat interval/basics/tanh 0.605 ± 0.012 ms 0.612 ± 0.011 ms 0.989 ± 0.026
bareinterval/basics/* 1.74 ± 0.041 μs 1.75 ± 0.041 μs 0.994 ± 0.033
bareinterval/basics/+ 0.521 ± 0.01 μs 0.521 ± 0.01 μs 1 ± 0.027
bareinterval/basics/- 0.531 ± 0.02 μs 0.501 ± 0.01 μs 1.06 ± 0.045
bareinterval/basics// 1.2 ± 0.03 μs 1.2 ± 0.031 μs 1 ± 0.036
bareinterval/basics/abs 0.191 ± 0.011 μs 0.201 ± 0.01 μs 0.95 ± 0.072
bareinterval/basics/acos 2.69 ± 0.02 μs 2.69 ± 0.02 μs 1 ± 0.01
bareinterval/basics/asin 3.01 ± 0.029 μs 3.02 ± 0.03 μs 0.997 ± 0.014
bareinterval/basics/atan 13.2 ± 0.18 μs 13.2 ± 0.19 μs 1 ± 0.02
bareinterval/basics/cos 0.0507 ± 0.00081 ms 0.0505 ± 0.00085 ms 1 ± 0.023
bareinterval/basics/cosh 7.18 ± 0.03 μs 7.18 ± 0.039 μs 1 ± 0.0068
bareinterval/basics/exp 4.31 ± 0.041 μs 4.27 ± 0.059 μs 1.01 ± 0.017
bareinterval/basics/inv 1 ± 0.02 μs 1 ± 0.02 μs 1 ± 0.028
bareinterval/basics/log 6.12 ± 4.2 μs 1.96 ± 4.2 μs 3.12 ± 7
bareinterval/basics/sin 0.0499 ± 0.018 ms 0.0491 ± 0.018 ms 1.02 ± 0.53
bareinterval/basics/sinh 10 ± 0.051 μs 10 ± 0.06 μs 1 ± 0.0079
bareinterval/basics/sqrt 1.13 ± 0.031 μs 1.13 ± 0.011 μs 1 ± 0.029
bareinterval/basics/tan 29 ± 0.26 μs 28.9 ± 0.27 μs 1 ± 0.013
bareinterval/basics/tanh 0.297 ± 0.0091 ms 0.3 ± 0.0092 ms 0.99 ± 0.043
interval/basics/* 3.1 ± 0.051 μs 3.11 ± 0.06 μs 1 ± 0.025
interval/basics/+ 1.59 ± 0.041 μs 1.57 ± 0.04 μs 1.01 ± 0.037
interval/basics/- 1.55 ± 0.04 μs 1.55 ± 0.041 μs 1 ± 0.037
interval/basics// 2.05 ± 0.05 μs 2.01 ± 0.05 μs 1.02 ± 0.035
interval/basics/abs 0.36 ± 0.031 μs 0.42 ± 0.031 μs 0.857 ± 0.097
interval/basics/acos 3.3 ± 0.05 μs 3.34 ± 0.08 μs 0.988 ± 0.028
interval/basics/asin 3.54 ± 0.04 μs 3.51 ± 0.041 μs 1.01 ± 0.016
interval/basics/atan 13.1 ± 0.26 μs 13.6 ± 0.26 μs 0.965 ± 0.027
interval/basics/cos 0.0692 ± 0.0034 ms 0.0687 ± 0.0035 ms 1.01 ± 0.071
interval/basics/cosh 9.01 ± 0.06 μs 9.02 ± 0.07 μs 0.999 ± 0.01
interval/basics/exp 4.92 ± 0.06 μs 4.91 ± 0.07 μs 1 ± 0.019
interval/basics/inv 1.48 ± 0.05 μs 1.49 ± 0.051 μs 0.993 ± 0.048
interval/basics/log 6.93 ± 0.07 μs 2.62 ± 0.07 μs 2.64 ± 0.075
interval/basics/sin 0.0679 ± 0.0033 ms 0.0673 ± 0.0033 ms 1.01 ± 0.07
interval/basics/sinh 10.7 ± 0.14 μs 10.7 ± 0.079 μs 1 ± 0.015
interval/basics/sqrt 1.58 ± 0.03 μs 1.57 ± 0.04 μs 1.01 ± 0.032
interval/basics/tan 0.0393 ± 0.0019 ms 0.0391 ± 0.0018 ms 1 ± 0.068
interval/basics/tanh 0.309 ± 0.0094 ms 0.313 ± 0.011 ms 0.99 ± 0.045
time_to_load 0.115 ± 0.00022 s 0.113 ± 0.0013 s 1.01 ± 0.012
Memory benchmarks
master c7e3f8a... master / c7e3f8a...
BigFloat MPFI/basics/* 0.424 k allocs: 21.3 kB 0.424 k allocs: 21.3 kB 1
BigFloat MPFI/basics/+ 0.302 k allocs: 16.5 kB 0.302 k allocs: 16.5 kB 1
BigFloat MPFI/basics/- 0.402 k allocs: 20.4 kB 0.402 k allocs: 20.4 kB 1
BigFloat MPFI/basics// 0.345 k allocs: 18.2 kB 0.345 k allocs: 18.2 kB 1
BigFloat MPFI/basics/abs 0.324 k allocs: 17.4 kB 0.324 k allocs: 17.4 kB 1
BigFloat MPFI/basics/acos 1.24 k allocs: 0.0445 MB 1.24 k allocs: 0.0445 MB 1
BigFloat MPFI/basics/asin 1.08 k allocs: 0.0355 MB 1.08 k allocs: 0.0355 MB 1
BigFloat MPFI/basics/atan 2.14 k allocs: 0.0543 MB 2.14 k allocs: 0.0543 MB 1
BigFloat MPFI/basics/cos 2.9 k allocs: 0.0975 MB 2.9 k allocs: 0.0975 MB 1
BigFloat MPFI/basics/cosh 0.781 k allocs: 0.0322 MB 0.781 k allocs: 0.0322 MB 1
BigFloat MPFI/basics/exp 0.902 k allocs: 0.036 MB 0.902 k allocs: 0.036 MB 1
BigFloat MPFI/basics/inv 0.351 k allocs: 18.4 kB 0.351 k allocs: 18.4 kB 1
BigFloat MPFI/basics/log 0.407 k allocs: 20.6 kB 0.407 k allocs: 20.6 kB 1
BigFloat MPFI/basics/sin 3.18 k allocs: 0.106 MB 3.18 k allocs: 0.106 MB 1
BigFloat MPFI/basics/sinh 0.915 k allocs: 0.0369 MB 0.915 k allocs: 0.0369 MB 1
BigFloat MPFI/basics/sqrt 0.302 k allocs: 16.5 kB 0.302 k allocs: 16.5 kB 1
BigFloat MPFI/basics/tan 2.8 k allocs: 0.098 MB 2.8 k allocs: 0.098 MB 0.999
BigFloat MPFI/basics/tanh 0.908 k allocs: 0.0362 MB 0.908 k allocs: 0.0362 MB 1
BigFloat bareinterval/basics/* 0.262 k allocs: 26 kB 0.262 k allocs: 26 kB 1
BigFloat bareinterval/basics/+ 0.202 k allocs: 20.4 kB 0.202 k allocs: 20.4 kB 1
BigFloat bareinterval/basics/- 0.202 k allocs: 20.4 kB 0.202 k allocs: 20.4 kB 1
BigFloat bareinterval/basics// 0.1 k allocs: 10.8 kB 0.1 k allocs: 10.8 kB 1
BigFloat bareinterval/basics/abs 0.199 k allocs: 20.1 kB 0.199 k allocs: 20.1 kB 1
BigFloat bareinterval/basics/acos 1.27 k allocs: 0.0692 MB 1.27 k allocs: 0.0692 MB 1
BigFloat bareinterval/basics/asin 1.17 k allocs: 0.0597 MB 1.17 k allocs: 0.0597 MB 1
BigFloat bareinterval/basics/atan 2.04 k allocs: 0.08 MB 2.04 k allocs: 0.08 MB 1
BigFloat bareinterval/basics/cos 2.45 k allocs: 0.185 MB 2.45 k allocs: 0.185 MB 1
BigFloat bareinterval/basics/cosh 1.01 k allocs: 0.0671 MB 1.01 k allocs: 0.0671 MB 1
BigFloat bareinterval/basics/exp 0.802 k allocs: 0.0397 MB 0.802 k allocs: 0.0397 MB 1
BigFloat bareinterval/basics/inv 0.198 k allocs: 20 kB 0.198 k allocs: 20 kB 1
BigFloat bareinterval/basics/log 0.616 k allocs: 0.0522 MB 0.616 k allocs: 0.0522 MB 1
BigFloat bareinterval/basics/sin 2.9 k allocs: 0.197 MB 2.9 k allocs: 0.197 MB 1
BigFloat bareinterval/basics/sinh 0.815 k allocs: 0.0407 MB 0.815 k allocs: 0.0407 MB 1
BigFloat bareinterval/basics/sqrt 0.26 k allocs: 25.8 kB 0.26 k allocs: 25.8 kB 1
BigFloat bareinterval/basics/tan 1.67 k allocs: 0.124 MB 1.67 k allocs: 0.124 MB 1
BigFloat bareinterval/basics/tanh 0.808 k allocs: 0.0399 MB 0.808 k allocs: 0.0399 MB 1
BigFloat interval/basics/* 0.263 k allocs: 26.8 kB 0.263 k allocs: 26.8 kB 1
BigFloat interval/basics/+ 0.203 k allocs: 21.2 kB 0.203 k allocs: 21.2 kB 1
BigFloat interval/basics/- 0.203 k allocs: 21.2 kB 0.203 k allocs: 21.2 kB 1
BigFloat interval/basics// 0.101 k allocs: 11.6 kB 0.101 k allocs: 11.6 kB 1
BigFloat interval/basics/abs 0.2 k allocs: 20.9 kB 0.2 k allocs: 20.9 kB 1
BigFloat interval/basics/acos 1.71 k allocs: 0.11 MB 1.71 k allocs: 0.11 MB 1
BigFloat interval/basics/asin 1.47 k allocs: 0.088 MB 1.47 k allocs: 0.0881 MB 0.999
BigFloat interval/basics/atan 2.04 k allocs: 0.0814 MB 2.04 k allocs: 0.0813 MB 1
BigFloat interval/basics/cos 2.45 k allocs: 0.186 MB 2.45 k allocs: 0.186 MB 1
BigFloat interval/basics/cosh 1.01 k allocs: 0.0681 MB 1.01 k allocs: 0.0681 MB 0.999
BigFloat interval/basics/exp 0.803 k allocs: 0.0408 MB 0.803 k allocs: 0.0408 MB 1
BigFloat interval/basics/inv 0.199 k allocs: 20.8 kB 0.199 k allocs: 20.8 kB 1
BigFloat interval/basics/log 0.917 k allocs: 0.0805 MB 0.917 k allocs: 0.0805 MB 1
BigFloat interval/basics/sin 2.9 k allocs: 0.198 MB 2.9 k allocs: 0.198 MB 1
BigFloat interval/basics/sinh 0.816 k allocs: 0.0418 MB 0.816 k allocs: 0.0417 MB 1
BigFloat interval/basics/sqrt 0.714 k allocs: 0.0675 MB 0.714 k allocs: 0.0675 MB 1
BigFloat interval/basics/tan 1.67 k allocs: 0.125 MB 1.67 k allocs: 0.125 MB 1
BigFloat interval/basics/tanh 0.809 k allocs: 0.0411 MB 0.809 k allocs: 0.0412 MB 0.997
bareinterval/basics/* 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/+ 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/- 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics// 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/abs 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/acos 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/asin 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/atan 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/cos 0.56 k allocs: 0.0423 MB 0.56 k allocs: 0.0423 MB 1
bareinterval/basics/cosh 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/exp 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/inv 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/log 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/sin 0.56 k allocs: 0.0423 MB 0.56 k allocs: 0.0423 MB 1
bareinterval/basics/sinh 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/sqrt 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/tan 0.29 k allocs: 23 kB 0.29 k allocs: 23 kB 1
bareinterval/basics/tanh 1.03 k allocs: 0.0359 MB 1.03 k allocs: 0.0359 MB 1
interval/basics/* 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/+ 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/- 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics// 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/abs 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/acos 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/asin 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/atan 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/cos 0.561 k allocs: 0.0431 MB 0.561 k allocs: 0.0431 MB 1
interval/basics/cosh 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/exp 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/inv 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/log 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/sin 0.561 k allocs: 0.0431 MB 0.561 k allocs: 0.0431 MB 1
interval/basics/sinh 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/sqrt 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/tan 0.291 k allocs: 24.4 kB 0.291 k allocs: 24.4 kB 1
interval/basics/tanh 1.03 k allocs: 0.0367 MB 1.03 k allocs: 0.0367 MB 1
time_to_load 0.149 k allocs: 11.2 kB 0.149 k allocs: 11.2 kB 1

OlivierHnt and others added 2 commits August 24, 2026 14:01
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Remove the platform-dependent Float16 CoreMath pin, relax the BLAS
thread-count assertions to round-trip invariants, and remove the Makie
and RecipesBase tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@OlivierHnt

Copy link
Copy Markdown
Member Author
  • sample: supported for all Rational bound types. The exact fraction of the sampled float
    is rationalized, since it can overflow small integer types.
    julia> sample(interval(Int16(1)//Int16(2), Int16(3)//Int16(4)))
    13019//25050 # was InexactError

OlivierHnt and others added 4 commits August 24, 2026 14:05
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rational literals are Rational{Int32} on 32-bit systems.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…Diff tag comparison

CoreMath ships no library for 32-bit systems. The unqualified import of
the tag ordering conflicts with the one of IntervalArithmetic.Symbols on
Julia 1.10.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.05%. Comparing base (6555626) to head (1604cd6).
⚠️ Report is 15 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #775       +/-   ##
===========================================
+ Coverage   75.56%   94.05%   +18.48%     
===========================================
  Files          32       33        +1     
  Lines        3131     3179       +48     
===========================================
+ Hits         2366     2990      +624     
+ Misses        765      189      -576     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…gebra

Needed for Julia v1.10.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@OlivierHnt OlivierHnt mentioned this pull request Aug 24, 2026
2 tasks
OlivierHnt and others added 2 commits August 24, 2026 16:51
The display now bypasses the digit rounding whenever the shortest
representation of a bound fits within the significant digits, matching
the output of Julia Base independently of the architecture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@Kolaru Kolaru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I didn't look into all tests in details (still I commented on what I caught), but I had a look at all the changes in the source files I believe.

Comment thread src/IntervalArithmetic.jl Outdated
lo = ifelse(lo == typemin(T), _value_min(T), lo)
hi = ifelse(hi == typemax(T), _value_max(T), hi)
val = convert(T, (1 - β) * lo + β * hi)
val = _value_round(T, (1 - β) * lo + β * hi)

@Kolaru Kolaru Aug 26, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure that this is the correct fix.

T is only the bound type. In principle, it says nothing about the type of the numbers in between, it is fine to return a Float64 for Rational bounds.

Furthermore, I don't know if rationalize keeps the distribution uniform.

If we would follow the convention that Distributions.jl uses for Uniform, then we would always return Float64, regardless of the bound type:

julia> using Distributions

julia> u = Uniform(0//1, 1//1)
Uniform{Rational{Int64}}(a=0//1, b=1//1)

julia> typeof(rand(u))
Float64

julia> u = Uniform(0.0f0, 1f0)
Uniform{Float32}(a=0.0f0, b=1.0f0)

julia> typeof(rand(u))
Float64

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok let's output a float for either AbstractFloat or Rational bound type.

Comment thread test/ITF1788_tests/libieeep1788_reduction.jl Outdated
Comment thread test/generate_ITF1788.jl Outdated
Comment thread test/runtests.jl Outdated
Comment thread src/piecewise.jl Outdated
Comment thread src/piecewise.jl Outdated
Comment thread src/piecewise.jl Outdated
Comment on lines 89 to 92
function (constant::Constant)(x::Interval)
y = interval(constant.value)
return _unsafe_interval(bareinterval(y), decoration(y), isguaranteed(x))
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think that this is the right handling of the guarantee here:

It doesn't matter if the input interval is correct or not, the output will always be the same. If there is a doubt about the bound of the interval and whether a piece of the function should be used or not, it should go to PieceWise instead.

On the other hand, we are currently trusting the value inside the Constant... we could argue that this should return a NG interval, except for Constant{ExactReal}. I'm not sure what's best here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok let's revert this.

Comment thread test/piecewise.jl
Comment thread src/piecewise.jl
Comment thread ext/IntervalArithmeticLinearAlgebraExt.jl Outdated
OlivierHnt and others added 5 commits August 27, 2026 11:58
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The reduction operations do not pertain to interval arithmetic.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rework intersect_domain via rightof and leftof on bounds, revert the
guarantee handling of Constant, and test a single point out of the
domain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@OlivierHnt

Copy link
Copy Markdown
Member Author

Ok so there are two things worth discussing a bit more:

  • I completely dropped support of sample for rational bounds because it's just weird with eg sample(interval(1//3))
  • I wonder about @Kolaru comment on Constant{<:ExactReal} actually... that does feel like the most consistent way to go though adding a bit of inconvenience

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Kolaru

Kolaru commented Aug 28, 2026

Copy link
Copy Markdown
Member

I'm fine with not having sample for Rational intervals.

Regarding Constant, the more I think about it the trickier I find it.

I believe that the main point of Constant is to avoid the NG flag. Otherwise, users can just use Returns and get a float, which will propagate the NG flag when interacting with an interval. It is also nice to have an interval output, but we could achieve that by converting the results in Piecewise when needed.

So I would actually be in favor of keeping the current convention that the constant is considered to be exact. I would however make it clear in the docstring and wrap the constant in exact at construction, so that it is clear when the function is shown or tested.

As a side note, it would be nice if exact and Constant supported a string as input and parse it to the best Float64/BigFloat/Interval when needed (then something like Constant("0.1") would be fully unambiguous).

@Kolaru

Kolaru commented Aug 28, 2026

Copy link
Copy Markdown
Member

Or actually, now that I am thinking about it, we could deprecate Constant entirely in favor of @exact Returns(x).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Behaviour of acot(::Interval)

3 participants