# \#intervals

**URL:** https://discourse.julialang.org/tag/intervals/117.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [\[ANN\] IntervalArithmetic 0.23](https://discourse.julialang.org/t/ann-intervalarithmetic-0-23/131136)

<div class="topic-metadata">

**Author:** [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)\
**Replies:** 0\
**Last updated:** [July 28, 2025, 3:38pm UTC](https://discourse.julialang.org/t/ann-intervalarithmetic-0-23/131136 "2025-07-28T15:38:14Z")

</div>

Dear all, It’s been a while since our last announcement about IntervalArithmetic.jl. We’d like to share what’s been happening over the past two years, and where the package is headed next. From v0.20 to v0.22 Version 0…

---

## [IntervalOptimisation.jl and threads gives lock conflicts](https://discourse.julialang.org/t/intervaloptimisation-jl-and-threads-gives-lock-conflicts/122588)

<div class="topic-metadata">

**Author:** [@JADekker](https://discourse.julialang.org/u/JADekker)\
**Replies:** 10\
**Last updated:** [November 29, 2024, 12:56am UTC](https://discourse.julialang.org/t/intervaloptimisation-jl-and-threads-gives-lock-conflicts/122588 "2024-11-29T00:56:02Z")

</div>

Hi, in a project I’m working on, I need to run many, many small optimizations. I like to do this by using Threads.@threads, which typically cuts down my runtime by a factor 2-4 for the problems I’m looking at. However, w…

---

## [Tools for computer assisted proofs in analysis](https://discourse.julialang.org/t/tools-for-computer-assisted-proofs-in-analysis/113479)

<div class="topic-metadata">

**Author:** [@foobar\_lv2](https://discourse.julialang.org/u/foobar_lv2)\
**Replies:** 13\
**Last updated:** [April 29, 2024, 12:19am UTC](https://discourse.julialang.org/t/tools-for-computer-assisted-proofs-in-analysis/113479 "2024-04-29T00:19:30Z")

</div>

I wanted to ask somewhat open-ended on what tools and packages exist in julia (and outside of julia) for computer assisted “numerical” proofs, and whether you know of examples where this has been done in the julia ecosys…

---

## [How to address an error?](https://discourse.julialang.org/t/how-to-address-an-error/93191)

<div class="topic-metadata">

**Author:** [@Kanishk](https://discourse.julialang.org/u/Kanishk)\
**Replies:** 4\
**Last updated:** [January 6, 2024, 8:05pm UTC](https://discourse.julialang.org/t/how-to-address-an-error/93191 "2024-01-06T20:05:21Z")

</div>

Hello, I am trying to find the steady state (or roots) of a system with 9 states using the Krawczyk method. For that I need to find a Jacobian, but I am getting the following error- " BoundsError: attempt to access 0-e…

---

## [How to plot 3-dimensional "IntervalBox()"?](https://discourse.julialang.org/t/how-to-plot-3-dimensional-intervalbox/103698)

<div class="topic-metadata">

**Author:** [@Ashu](https://discourse.julialang.org/u/Ashu)\
**Replies:** 1\
**Last updated:** [September 9, 2023, 2:24pm UTC](https://discourse.julialang.org/t/how-to-plot-3-dimensional-intervalbox/103698 "2023-09-09T14:24:52Z")

</div>

Hello, Let’s say there is a box = IntervalBox(1..2, 2..3, 3..4). How can I plot it in Pluto.jl notebook? I am using IntervalArithmetic.jl and Plots.jl packages. The code block is not working for me. begin box = Inte…

---

## [Matching for interpolation](https://discourse.julialang.org/t/matching-for-interpolation/103636)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 4\
**Last updated:** [September 8, 2023, 2:49pm UTC](https://discourse.julialang.org/t/matching-for-interpolation/103636 "2023-09-08T14:49:24Z")

</div>

Is there a matching package that can do something like V = \[1.1, 2, 4.8, 6, 9, 11\] x = 5.1 @match begin V\[i\] ≤ x \< V\[i+1\] =\> #some interp function of V\[i\] and V\[i+i\]

---

## [Mid points of interval elements in interval vector](https://discourse.julialang.org/t/mid-points-of-interval-elements-in-interval-vector/93090)

<div class="topic-metadata">

**Author:** [@Kanishk](https://discourse.julialang.org/u/Kanishk)\
**Replies:** 4\
**Last updated:** [January 17, 2023, 1:38pm UTC](https://discourse.julialang.org/t/mid-points-of-interval-elements-in-interval-vector/93090 "2023-01-17T13:38:24Z")

</div>

Hello, I have an interval vector containing 10 interval elements (\[0…50\]). Now I want to get a vector containing the midpoints of all the interval elements. How to do it? Thank you

---

## [\[Ann\] IntervalRootFinding.jl for finding all roots of a multivariate function](https://discourse.julialang.org/t/ann-intervalrootfinding-jl-for-finding-all-roots-of-a-multivariate-function/9515)

<div class="topic-metadata">

**Author:** [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Replies:** 52\
**Last updated:** [September 26, 2022, 5:12am UTC](https://discourse.julialang.org/t/ann-intervalrootfinding-jl-for-finding-all-roots-of-a-multivariate-function/9515 "2022-09-26T05:12:37Z")

</div>

We are excited to announce v0.2 of the IntervalRootFinding.jl package, which has been completely rewritten from scratch. This package exports a function roots that is guaranteed to find all roots of a given function \\ma…

---

## [Best way to take derivatives of unevenly spaced data (with interpolations? discrete derivatives?)](https://discourse.julialang.org/t/best-way-to-take-derivatives-of-unevenly-spaced-data-with-interpolations-discrete-derivatives/54097)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 37\
**Last updated:** [April 30, 2021, 12:44pm UTC](https://discourse.julialang.org/t/best-way-to-take-derivatives-of-unevenly-spaced-data-with-interpolations-discrete-derivatives/54097 "2021-04-30T12:44:34Z")

</div>

Hi, I have a function f(t), where f is numerically sampled at discrete points in time t that are NOT evenly sampled in time. (This is unavoidable.) I need to take the first and second derivatives of f(t), compute a comp…

---

## [Rigorous spectral opnorm](https://discourse.julialang.org/t/rigorous-spectral-opnorm/82739)

<div class="topic-metadata">

**Author:** [@mathmath](https://discourse.julialang.org/u/mathmath)\
**Replies:** 17\
**Last updated:** [June 15, 2022, 12:28pm UTC](https://discourse.julialang.org/t/rigorous-spectral-opnorm/82739 "2022-06-15T12:28:55Z")

</div>

I am wondering if there exists a way to rigorously compute spectral norms (an upper bound) of matrices (so the usual 2-norm for matrices) using the IntervalArithmetics package (GitHub - JuliaIntervals/IntervalArithmetic.…

---

## [Comparison of IntervalArithmetic.jl and Measurements.jl](https://discourse.julialang.org/t/comparison-of-intervalarithmetic-jl-and-measurements-jl/80474)

<div class="topic-metadata">

**Author:** [@pierre-haessig](https://discourse.julialang.org/u/pierre-haessig)\
**Replies:** 11\
**Last updated:** [May 5, 2022, 9:53am UTC](https://discourse.julialang.org/t/comparison-of-intervalarithmetic-jl-and-measurements-jl/80474 "2022-05-05T09:53:29Z")

</div>

I was just discussing with colleagues some of the classical theoretical oddities of interval arithmetic, in particular the fact that, for an interval X = \[a,b\], we have X-X \\neq 0 (we have instead only the inclusion 0 \\i…

---

## [Global optimization using \`IntervalArithmetic.jl\` and \`ForwardDiff.jl\` on the GPU with \`CUDA.jl\`](https://discourse.julialang.org/t/global-optimization-using-intervalarithmetic-jl-and-forwarddiff-jl-on-the-gpu-with-cuda-jl/73975)

<div class="topic-metadata">

**Author:** [@lmg](https://discourse.julialang.org/u/lmg)\
**Replies:** 7\
**Last updated:** [January 6, 2022, 10:22pm UTC](https://discourse.julialang.org/t/global-optimization-using-intervalarithmetic-jl-and-forwarddiff-jl-on-the-gpu-with-cuda-jl/73975 "2022-01-06T22:22:14Z")

</div>

I’m trying to solve a global optimization problem concerning the parameters of the “Two Compartment Model”. Given an initial parameter search space that’s split into smaller boxes of a predefined maximum width, I’m inter…

---

## [IntervalOptimisation surprising result](https://discourse.julialang.org/t/intervaloptimisation-surprising-result/64144)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 9\
**Last updated:** [July 6, 2021, 6:11pm UTC](https://discourse.julialang.org/t/intervaloptimisation-surprising-result/64144 "2021-07-06T18:11:08Z")

</div>

I need to find the maximiser and the maximum of functions that have a narrow bump. I had some issues with numerics, so I decided to try my luck with intervals. Here is a minimal working (?) example: using IntervalArith…

---

## [What is the alternative to Python gym.spaces.Box() in Julia?](https://discourse.julialang.org/t/what-is-the-alternative-to-python-gym-spaces-box-in-julia/52758)

<div class="topic-metadata">

**Author:** [@ZdM87](https://discourse.julialang.org/u/ZdM87)\
**Replies:** 2\
**Last updated:** [January 3, 2021, 12:52pm UTC](https://discourse.julialang.org/t/what-is-the-alternative-to-python-gym-spaces-box-in-julia/52758 "2021-01-03T12:52:06Z")

</div>

In Python gym’s there is a class called Box that defines a (possibly unbounded) box in R^n. Is there any alternative to this box in Julia? There is IntervalSets.jl but I cannot seem to be able to create a Cartesian prod…

---

## [How to write xs\[i\]..xs\[i+1\] in Julia 1.5 , two dots](https://discourse.julialang.org/t/how-to-write-xs-i-xs-i-1-in-julia-1-5-two-dots/52684)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 7\
**Last updated:** [January 1, 2021, 7:17pm UTC](https://discourse.julialang.org/t/how-to-write-xs-i-xs-i-1-in-julia-1-5-two-dots/52684 "2021-01-01T19:17:25Z")

</div>

how to write in Julai 1.5 xs\[i\]..xs\[i+1\] in Julai 1.5 function make\_intervals(N=10) xs = linspace(0, 2, N+1) return \[xs\[i\]..xs\[i+1\] for i in 1:length(xs)-1\] end Paul

---

## [Interval times Int64 and Interval times BigInt discrepancy](https://discourse.julialang.org/t/interval-times-int64-and-interval-times-bigint-discrepancy/51902)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 7\
**Last updated:** [December 16, 2020, 1:47pm UTC](https://discourse.julialang.org/t/interval-times-int64-and-interval-times-bigint-discrepancy/51902 "2020-12-16T13:47:22Z")

</div>

I want to get the positive root of some polynomials with ridiculous precision. The polynomials I care I about are of the form \\sum\_{k=0}^{n-1} a\_k x^k - x^n, with a\_k's being natural numbers. I am trying to write a progr…

---

## [High precision interval rounding error](https://discourse.julialang.org/t/high-precision-interval-rounding-error/51885)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 6\
**Last updated:** [December 15, 2020, 11:46pm UTC](https://discourse.julialang.org/t/high-precision-interval-rounding-error/51885 "2020-12-15T23:46:34Z")

</div>

Before everything I need a disclaimer: I do understand that the precision which I set is comically large. However, there is a legitimate reason for what I am doing, but I’m not going to go into it. The following snippet…

---

## [Fast sparse interval matrices?](https://discourse.julialang.org/t/fast-sparse-interval-matrices/44864)

<div class="topic-metadata">

**Author:** [@fph](https://discourse.julialang.org/u/fph)\
**Replies:** 1\
**Last updated:** [August 13, 2020, 12:41pm UTC](https://discourse.julialang.org/t/fast-sparse-interval-matrices/44864 "2020-08-13T12:41:50Z")

</div>

I have noticed that using sparse interval matrices is a big performance hit: using ValidatedNumerics, SparseArrays import ValidatedNumerics.IntervalArithmetic.hull n = 10000 P = sprand(n, n, 0.01) Q = sprandn(n, n, 0.0…

---

## [Parser support for open/closed interval notation?](https://discourse.julialang.org/t/parser-support-for-open-closed-interval-notation/43781)

<div class="topic-metadata">

**Author:** [@cce](https://discourse.julialang.org/u/cce)\
**Replies:** 1\
**Last updated:** [July 28, 2020, 8:37am UTC](https://discourse.julialang.org/t/parser-support-for-open-closed-interval-notation/43781 "2020-07-28T08:37:21Z")

</div>

I’m working with Interval{DateTime} these days, in particular, within a medical data processing application that requires modeling of with closed/open endpoints. It’s inconvenient to write/update intervals due to the pe…

---

## [Take numbers form two intervals in concentric circles](https://discourse.julialang.org/t/take-numbers-form-two-intervals-in-concentric-circles/42045)

<div class="topic-metadata">

**Author:** [@mors](https://discourse.julialang.org/u/mors)\
**Replies:** 3\
**Last updated:** [July 13, 2020, 2:51pm UTC](https://discourse.julialang.org/t/take-numbers-form-two-intervals-in-concentric-circles/42045 "2020-07-13T14:51:21Z")

</div>

I am trying to take numbers from two intervals in Julia. The problem is the following, I am trying to create concentric circles and I need to generate vectors of dimension equal to 15 filled with numbers taken from each …

---

## [Fourier transform freezes Julia](https://discourse.julialang.org/t/fourier-transform-freezes-julia/38771)

<div class="topic-metadata">

**Author:** [@Martijn-R](https://discourse.julialang.org/u/Martijn-R)\
**Replies:** 5\
**Last updated:** [July 3, 2020, 12:56pm UTC](https://discourse.julialang.org/t/fourier-transform-freezes-julia/38771 "2020-07-03T12:56:30Z")

</div>

I am processing an audio sample (about 20minutes long) in small parts of several seconds. At the moment my code freezes every now and then. The example below is a bit silly but is a minimal ‘working’ example which oft…

---

## [@variables as function parameter](https://discourse.julialang.org/t/variables-as-function-parameter/31650)

<div class="topic-metadata">

**Author:** [@cvanaret](https://discourse.julialang.org/u/cvanaret)\
**Replies:** 1\
**Last updated:** [December 3, 2019, 5:11pm UTC](https://discourse.julialang.org/t/variables-as-function-parameter/31650 "2019-12-03T17:11:17Z")

</div>

Hi, I started playing with the IntervalConstraintProgramming module in Julia, and ran into a problem. Here is a minimal example: using IntervalConstraintProgramming using IntervalArithmetic using ModelingToolkit func…

---

## [Interval arithmetic - computation time](https://discourse.julialang.org/t/interval-arithmetic-computation-time/14633)

<div class="topic-metadata">

**Author:** [@OlivierHnt](https://discourse.julialang.org/u/OlivierHnt)\
**Replies:** 16\
**Last updated:** [November 29, 2019, 10:02am UTC](https://discourse.julialang.org/t/interval-arithmetic-computation-time/14633 "2019-11-29T10:02:37Z")

</div>

Hi, I just started using the IntervalArithmetic package for Julia. For the same computations, Matlab (using IntLab) performs extremely well in comparison with Julia. The implementation has ben adapted, that is the compu…

---

## [Variable reference in a function created by a macro](https://discourse.julialang.org/t/variable-reference-in-a-function-created-by-a-macro/26722)

<div class="topic-metadata">

**Author:** [@bocc](https://discourse.julialang.org/u/bocc)\
**Replies:** 7\
**Last updated:** [July 25, 2019, 3:56pm UTC](https://discourse.julialang.org/t/variable-reference-in-a-function-created-by-a-macro/26722 "2019-07-25T15:56:31Z")

</div>

Hello, I am trying to use IntervalConstraintProgramming & associated packages to solve a geometric feasibility problem. In order to be able to use functions in constraints, the ICP package provides a macro for function …

---

## [Should Dates.Period be a subtype of Integer](https://discourse.julialang.org/t/should-dates-period-be-a-subtype-of-integer/23465)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 5\
**Last updated:** [April 24, 2019, 8:17pm UTC](https://discourse.julialang.org/t/should-dates-period-be-a-subtype-of-integer/23465 "2019-04-24T20:17:08Z")

</div>

Because of how IntervalSets calculates a “duration”, I went into a short rabbit hole of why aren’t all the types of Dates considered as subtypes of Integers (see here for the instigator). The main reason is that periods…

---

## [Help with IntervalArithmetic](https://discourse.julialang.org/t/help-with-intervalarithmetic/4497)

<div class="topic-metadata">

**Author:** [@mgameiro](https://discourse.julialang.org/u/mgameiro)\
**Replies:** 13\
**Last updated:** [June 27, 2017, 10:54pm UTC](https://discourse.julialang.org/t/help-with-intervalarithmetic/4497 "2017-06-27T22:54:07Z")

</div>

I am using the IntervalArithmetic packaged and I need to convert a vector and a matrix of floats to a vector and matrix of intervals. Is there a simple way to do this? More specifically, let’s say I have v = \[1; 2.1\] …
