Intervals

There are several Julia packages for interval sets and interval arithmetic.

Overview

IntervalSets.jl and Intervals.jl both focus on working with interval sets, in a mathematical sense (as opposed to a numerical sense). While there have been discussions on merging the two (see IntervalSets.jl#67 and Intervals.jl#94), they currently still exist as separate packages.

IntervalArithmetic.jl on the other hand focuses on interval arithmetic, i.e. carrying out operations like a+ba+b where aa or bb (or both!) are intervals instead of numbers. There were issues to add an dependency on IntervalSets.jl, but this also has not yet been realized.

Packages

IntervalSets.jl

GitHub Repo stars deps IntervalSets Downloads
Stable Dev GitHub last commit (branch) version Coverage

Intervals.jl

GitHub Repo stars deps Intervals Downloads
Stable Dev GitHub last commit (branch) version Coverage

IntervalArithmetic.jl

GitHub Repo stars deps IntervalArithmetic Downloads
Stable Dev GitHub last commit (branch) version Coverage
Example of adding an interval and a number:

julia> a = 1;

julia> b = interval(3, 4)
[3.0, 4.0]_com

julia> a+b
[4.0, 5.0]_com_NG

Examples of applying a function to an interval:

julia> f(interval(3, 4))
[9.0, 16.0]_com

julia> f(interval(-3, 4))
[0.0, 16.0]_com

To quote from the intro of the IntervalArithmetic.jl docs:

Since f(x) does not contain 0, the true range of the function ff over the interval [3,4][3,4] is guaranteed not to contain 00, and hence we obtain the following property.

Theorem: ff has no root in the interval [3,4][3,4].

This theorem has been obtained using floating-point computations!

Star History

This website is a community effort covering a lot of ever-changing information. It will therefore never be complete or without error. If you see something wrong, or have something to contribute, please see the "Contributing" section in the github repository.

Last modified: May 03, 2024. Built with Franklin.jl