Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade documentation and use Documenter.jl #31

Merged
merged 5 commits into from
May 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/build/
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
# IntervalArithmetic.jl #

[![Build Status](https://travis-ci.org/JuliaIntervals/IntervalArithmetic.jl.svg?branch=master)](https://travis-ci.org/dpsanders/IntervalArithmetic.jl)
[![Build Status](https://travis-ci.org/JuliaIntervals/IntervalArithmetic.jl.svg?branch=master)](https://travis-ci.org/JuliaIntervals/IntervalArithmetic.jl)
[![Coverage Status](https://coveralls.io/repos/JuliaIntervals/IntervalArithmetic.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/JuliaIntervals/IntervalArithmetic.jl?branch=master)
[![codecov](
https://codecov.io/gh/JuliaIntervals/IntervalArithmetic.jl/branch/master/graph/badge.svg)]
(https://codecov.io/gh/JuliaIntervals/IntervalArithmetic.jl)
[![codecov](https://codecov.io/gh/JuliaIntervals/IntervalArithmetic.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaIntervals/IntervalArithmetic.jl)

[![Join the chat at https://gitter.im/JuliaIntervals/IntervalArithmetic.jl](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/JuliaIntervals/IntervalArithmetic.jl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

`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.

## Installation
To install the package, from within Julia do

julia> Pkg.add("IntervalArithmetic")
### Authors
- [Luis Benet](http://www.cicc.unam.mx/~benet/), Instituto de Ciencias Físicas, Universidad Nacional Autónoma de México (UNAM)
- [David P. Sanders](http://sistemas.fciencias.unam.mx/~dsanders), Departamento de Física, Facultad de Ciencias, Universidad Nacional Autónoma de México (UNAM)

### Contributors
- Oliver Heimlich
- Nikolay Kryukov
- John Verzani

## Interval 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
## Installation
To install the package, from within Julia do

```julia
julia> Pkg.add("IntervalArithmetic")
```

## Documentation
Documentation is available [**here**](https://juliaintervals.github.io/IntervalArithmetic.jl/).

## IEEE Standard 1788-2015 - IEEE Standard for Interval Arithmetic
Documentation is available [here](https://juliaintervals.github.io/IntervalArithmetic.jl/).

## Standard for Interval Arithmetic: IEEE 1788-2015

The IEEE Std 1788-2015 - IEEE Standard for Interval Arithmetic was [published](https://standards.ieee.org/findstds/standard/1788-2015.html) 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](https://github.com/oheim/ITF1788), originally written by Marco Nehmeier and Maximilian Kiesner, and converted to a common format and to output tests for Julia by Oliver Heimlich.
Expand All @@ -35,26 +45,18 @@ To do so, we have incorporated tests from the excellent [ITF1788 test suite](htt
- *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)

## Related packages
### Related packages
- [MPFI.jl](https://github.com/andrioni/MPFI.jl), a Julia wrapper around the [MPFI C library](http://perso.ens-lyon.fr/nathalie.revol/software.html), a multiple-precision interval arithmetic library based on MPFR
- [Intervals.jl](https://github.com/andrioni/Intervals.jl), an alternative implementation of basic interval functions.

## Authors
- [Luis Benet](http://www.cicc.unam.mx/~benet/), Instituto de Ciencias Físicas,
Universidad Nacional Autónoma de México (UNAM)
- [David P. Sanders](http://sistemas.fciencias.unam.mx/~dsanders),
Departamento de Física, Facultad de Ciencias, Universidad Nacional Autónoma de México (UNAM)

## Contributors
- Oliver Heimlich
- Nikolay Kryukov
- John Verzani
- [Unums.jl](https://github.com/JuliaComputing/Unums.jl), an implementation of interval arithmetic with variable precision ("ubounds")


## History ##
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.


## Acknowledgements ##
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 grants IN-117214 and IN-117117. LB acknowledges support through a *Cátedra Moshinsky* (2013).
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.
24 changes: 24 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Documenter, IntervalArithmetic

makedocs(
modules = [IntervalArithmetic],
format = :html,
sitename = "IntervalArithmetic",
pages = [
"Package" => "index.md",
"Basic usage" => "usage.md",
"Decorations" => "decorations.md",
"Multi-dimensional boxes" => "multidim.md",
"Rounding" => "rounding.md",
"API" => "api.md"
]
)

deploydocs(
repo = "github.com/JuliaIntervals/IntervalArithmetic.jl.git",
target = "build",
julia = "0.5",
osname = "linux",
deps = nothing,
make = nothing
)
48 changes: 0 additions & 48 deletions docs/multidim.md

This file was deleted.

18 changes: 18 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```@meta
DocTestSetup = quote
using IntervalArithmetic
end
```

# API

```@index
Pages = ["api.md"]
Module = [IntervalArithmetic]
Order = [:type, :macro, :function, :constant]
```

```@autodocs
Modules = [IntervalArithmetic]
Order = [:type, :macro, :function, :constant]
```
50 changes: 22 additions & 28 deletions docs/decorations.md → docs/src/decorations.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
[I 160508 10:04:49 handlers:132] Browser Connected: http://127.0.0.1:8000/multid<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
MathJax.Hub.Config({
TeX: { extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "autoload-all.js"] }
});
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$']],
processEscapes: true
}
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
</script>
```@meta
DocTestSetup = quote
using IntervalArithmetic
end
```

# Decorations

Expand All @@ -40,19 +29,20 @@ An example will be given at the end of this section.

The simplest way to create a `DecoratedInterval` is with the `@decorated` macro,
which does correct rounding:
```
```jldoctest decorations
julia> @decorated(0.1, 0.3)
[0.0999999, 0.300001]
[0.1, 0.3]
```
The `DecoratedInterval` constructor may also be used if necessary:
```
```jldoctest decorations
julia> X = DecoratedInterval(3, 4)
[3, 4]
```

By default, decorations are not displayed. The following turns on display of decorations:
```
```jldoctest decorations
julia> setformat(decorations=true)
6

julia> X
[3, 4]_com
Expand All @@ -66,7 +56,7 @@ If no decoration is explicitly specified when a `DecoratedInterval` is created,


An explicit decoration may be provided for advanced use:
```
```jldoctest decorations
julia> DecoratedInterval(3, 4, dac)
[3, 4]_dac

Expand All @@ -79,7 +69,7 @@ Here, a new `DecoratedInterval` was created by extracting the interval from anot

A decoration is the combination of an interval together with the sequence of functions that it has passed through. Here are some examples:

```
```jldoctest decorations
julia> X1 = @decorated(0.5, 3)
[0.5, 3]_com

Expand All @@ -88,7 +78,7 @@ julia> sqrt(X1)
```
In this case, both input and output are "common" intervals, meaning that they are closed and bounded, and that the resulting function is continuous over the input interval, so that fixed-point theorems may be applied. Since `sqrt(X1) ⊆ X1`, we know that there must be a fixed point of the function inside the interval `X1` (in this case, `sqrt(1) == 1`).

```
```jldoctest decorations
julia> X2 = DecoratedInterval(3, ∞)
[3, ∞]_dac

Expand All @@ -97,7 +87,7 @@ julia> sqrt(X2)
```
Since the intervals are unbounded here, the maximum decoration possible is `dac`.

```
```jldoctest decorations
julia> X3 = @decorated(-3, 4)
[-3, 4]_com

Expand All @@ -106,9 +96,9 @@ julia> sign(X3)
```
The `sign` function is discontinuous at 0, but is defined everywhere on the input interval, so the decoration is `def`.

```
```jldoctest decorations
julia> X4 = @decorated(-3.5, 4.1)
[-3.5, 4.10001]_com
[-3.5, 4.1]_com

julia> sqrt(X4)
[0, 2.02485]_trv
Expand All @@ -118,7 +108,7 @@ The negative part of `X` is discarded by the `sqrt` function, since its domain i

In this case, we know why the decoration was reduced to `trv`. But if this were just a single step in a longer calculation, a resulting `trv` decoration shows only that something like this happened *at some step*. For example:

```
```jldoctest decorations
julia> X5 = @decorated(-3, 3)
[-3, 3]_com

Expand All @@ -133,7 +123,7 @@ julia> asin(sqrt(X6))
```
In both cases, `asin(sqrt(X))` gives a result with a `trv` decoration, but
we do not know at which step this happened, unless we break down the function into its constituent parts:
```
```jldoctest decorations
julia> sqrt(X5)
[0, 1.73206]_trv

Expand All @@ -143,3 +133,7 @@ julia> sqrt(X6)
This shows that loose evaluation occurred in different parts of the expression in the two different cases.

In general, the `trv` decoration is thus used only to signal that "something unexpected" happened during the calculation. Often this is later used to split up the original interval into pieces and reevaluate the function on each piece to refine the information that is obtained about the function.

```@meta
DocTestSetup = nothing
```
56 changes: 30 additions & 26 deletions docs/index.md → docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,52 @@

`IntervalArithmetic.jl` is a Julia package for performing *Validated Numerics* in Julia, i.e. *rigorous* computations with finite-precision floating-point arithmetic.

## Installation
To install the package, from within Julia do
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.

julia> Pkg.add("IntervalArithmetic")
The aim of the package is correctness over speed, although performance considerations are also taken into account.


## Interval 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.
### Authors
- [Luis Benet](http://www.cicc.unam.mx/~benet/), Instituto de Ciencias Físicas, Universidad Nacional Autónoma de México (UNAM)
- [David P. Sanders](http://sistemas.fciencias.unam.mx/~dsanders), Departamento de Física, Facultad de Ciencias, Universidad Nacional Autónoma de México (UNAM)

### Contributors
- Oliver Heimlich
- Nikolay Kryukov
- John Verzani


The aim of the package is correctness over speed, although performance considerations are also taken into account
## Installation
To install the package, from within Julia do

```julia
julia> Pkg.add("IntervalArithmetic")
```

## Contents:
- [Basic usage](usage.md)
- [Multi-dimensional](multidim.md)
- [Rounding](rounding.md)
- [Decorations](decorations.md)
## Contents

```@contents
Pages = ["usage.md",
"decorations.md",
"multidim.md",
"rounding.md",
"api.md"
]
```

## Bibliography

- *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)

## Related packages
### Related packages
- [MPFI.jl](https://github.com/andrioni/MPFI.jl), a Julia wrapper around the [MPFI C library](http://perso.ens-lyon.fr/nathalie.revol/software.html), a multiple-precision interval arithmetic library based on MPFR
- [Intervals.jl](https://github.com/andrioni/Intervals.jl), an alternative implementation of basic interval functions.
- [Unums.jl](https://github.com/JuliaComputing/Unums.jl), an implementation of interval
arithmetic with variable precision ("ubounds")

## Authors
- [Luis Benet](http://www.cicc.unam.mx/~benet/), Instituto de Ciencias Físicas,
Universidad Nacional Autónoma de México (UNAM)
- [David P. Sanders](http://sistemas.fciencias.unam.mx/~dsanders),
Departamento de Física, Facultad de Ciencias, Universidad Nacional Autónoma de México (UNAM)

## Contributors
- Oliver Heimlich
- Nikolay Kryukov
- John Verzani
- [Unums.jl](https://github.com/JuliaComputing/Unums.jl), an implementation of interval arithmetic with variable precision ("ubounds")


## Acknowledgements ##
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 Moshinsky* (2013).
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.
Loading