error value equal to zero when taking a ratio
CITESmike2018 opened this issue · comments
This isn't a bug but a feature. x
is exactly the same thing as x
and there is no doubt that x/x
is equal to 1, so the uncertainty must be 0. y
instead is an independent measure which accidentally happens to have yielded the same value and uncertainty as x
, but it's fundamentally something different.
If the fact that x
is the same thing as x
wasn't taken into account, this wouldn't be possible
julia> x = 1 ± 0.5
1.0 ± 0.5
julia> y = 1 ± 0.5
1.0 ± 0.5
julia> x + x
2.0 ± 1.0
julia> 2 * x
2.0 ± 1.0
julia> x + y
2.0 ± 0.71
x + x
would return the same as x + y
, which is different from 2 * x
, which is totally flawed.
This is also extensively documented in the manual, see for example:
- https://juliaphysics.github.io/Measurements.jl/v2.3/usage/#Usage-1, in particular the "Note" box and the "Correlation Between Variables" section;
- https://juliaphysics.github.io/Measurements.jl/v2.3/examples/#Correlation-Between-Variables-1.