Covar.jl is a package to handle systems with multiple uncertainties, whose correlations are described by covariance matrices. Part of the motivation for developing this package was the desire to nicely handle fit results, as the resulting fit parameters are usually not independent. For independent measurements, `Measurements.jl`

already exists, but it doesn’t have a way to handle covariance matrices, so the decision was made to develop this package, as the underlying structure had to be quiet different from `Measurements.jl`

.

The package makes heavy use of Julia’s method overloading and `DiffRules.jl`

, in order to make error propagation as intuitive as possible. A `CovariantSystem`

can be conveniently constructed with the `@covar_system`

macro, which returns an array of `CovariantVars`

. Any mathematical operation on these produces a `DerivedVar`

, which handles the error propagation.

A simple example:

```
julia> a, b = @covar_system [2., 3.] [.3 .1; .1 .4]
2-element Array{CovariantVar{Float64},1}:
x_1 = 2.0 ± 0.5477225575051661
Vₘ = [0.3 0.1; 0.1 0.4]
x_2 = 3.0 ± 0.6324555320336759
Vₘ = [0.3 0.1; 0.1 0.4]
julia> c = a^2 + 2b + 1
f({xᵢ}) = 11.0 ± 2.8284271247461903
{∇⃗f} = Array{Float64,1}[[4.0, 2.0]]
{Vₘ} = Array{Float64,2}[[0.3 0.1; 0.1 0.4]]
julia> val(c), err(c)
(11.0, 2.8284271247461903)
```

The package is still in ongoing development, but should already be quite usable. There’s still work to be done, especially adding tests. I’m open for issues or suggestions, as I’m still fairly new to the language.