IntervalArithmetic.jl
is a Julia package for performing Validated Numerics in Julia, i.e. rigorous computations with finite-precision floating-point arithmetic.
All calculations are carried out using interval arithmetic: all quantities are treated as intervals, which are propagated throughout a calculation. The final result is an interval that is guaranteed to contain the correct result, starting from the given initial data.
The aim of the package is correctness over speed, although performance considerations are also taken into account.
This fork aims to reduce the complexity of the code base by
- restricting the scope of the implementation,
- intentionally making IEEE 1788 not subtypes of Julia's
Number
type, - making invalid data unrepresentable, and
- using Julia's multiple dispatch more extensively.
As a side-effect of these changes, the manageability, reliability and performance of the code should increase, for the internal code base and for user code.
The following elements are removed from scope:
- interval construction from strings (for now)
- multi-dimensional intervals
- complex intervals
- intervals as a drop-in replacement for numbers (for this feature, see NumberIntervals.jl)
- interval decoration
- interval construction using macros
- support for the Windows operating system
- intervals with
Rational
andInt
boundaries (only floating point)
As a result, many operations are simplified.
IEEE 1788 definitions for interval comparison (equals, larger-than, etc) are inconsistent with Base Julia specifications for Number
-comparisons.
As a result, IEEE 1788 intervals are not suitable as drop-in replacements for
Number
s in third-party numeric algorithms. NumberIntervals.jl provides a non-IEEE 1788-compliant interval type which is a subtype of Real
and can be safely used in third-party numeric algorithms.
In this fork Interval
s are restricted to non-empty, IEEE 1788-compliant values. As a result, no validity or emptiness checks need to be performed on Interval
arguments of methods.
This fork represents empty intervals and invalid intervals using separate types. As a result, many trivial cases can be handled in specialized methods.
Due to Julia's 'small union' optimizations, there is no negative impact on performance.
In fact, in cases where emptiness can be inferred during compilation, performance may increase substantially.
Furthermore, IEEE 1788-invalid intervals (not-an-interval) cause a MethodError
in almost any context which makes invalid input easy to detect and locate in user code.
- Luis Benet, Instituto de Ciencias Físicas, Universidad Nacional Autónoma de México (UNAM)
- David P. Sanders, Departamento de Física, Facultad de Ciencias, Universidad Nacional Autónoma de México (UNAM)
- Oliver Heimlich
- Nikolay Kryukov
- John Verzani
This fork includes contributions from Josua Grawitter.
Documentation for the package is available here.
The best way to learn how to use the package is to look at the tutorial, available in the organisation webpage here.
To install the package, from within Julia do
julia> Pkg.add("https://github.com/gwater/IntervalArithmetic.jl.git")
Please note that this fork is not registered.
The IEEE Std 1788-2015 - IEEE Standard for Interval Arithmetic was published in June 2015. We are working towards having IntervalArithmetic.jl
be conformant with this standard.
To do so, we have incorporated tests from the excellent ITF1788 test suite, originally written by Marco Nehmeier and Maximilian Kiesner, and converted to a common format and to output tests for Julia by Oliver Heimlich.
- Validated Numerics: A Short Introduction to Rigorous Computations, W. Tucker, Princeton University Press (2010)
- Introduction to Interval Analysis, R.E. Moore, R.B. Kearfott & M.J. Cloud, SIAM (2009)
- MPFI.jl, a Julia wrapper around the MPFI C library, a multiple-precision interval arithmetic library based on MPFR
- Intervals.jl, an alternative implementation of basic interval functions.
- Intervals.jl, an alternative implementation of basic interval functions by Invenia Technical Computing.
- Unums.jl, an implementation of interval arithmetic with variable precision ("ubounds")
This project was begun during a masters' course in the postgraduate programs in Physics and in Mathematics at UNAM during the second semester of 2013 (in Python), and was reinitiated -- now in Julia -- in the first semester of 2015. We thank the participants of the courses for putting up with the half-baked material and contributing energy and ideas.
This project was developed in a masters' course in the postgraduate programs in Physics and in Mathematics at UNAM during the second semester of 2013 and the first semester of 2015. We thank the participants of the courses for putting up with the half-baked material and contributing energy and ideas.
Financial support is acknowledged from DGAPA-UNAM PAPIME grants PE-105911 and PE-107114, and DGAPA-UNAM PAPIIT grant IN-117214. LB acknowledges support through a Cátedra Marcos Moshinsky (2013). DPS acknowledges a sabbatical fellowship from CONACYT and thanks Alan Edelman and the Julia group at MIT for hosting his sabbatical visit.