Inconsistency in arithmetic expressions?
heitorPB opened this issue · comments
Is this expected?
julia> (1234 ± 1) / (1234 ± 1)
1.0 ± 0.0011
julia> (1234 ± 1) - (1234 ± 1)
0.0 ± 1.4
julia> x = (1234 ± 1)
1234.0 ± 1.0
julia> x / x
1.0 ± 1.1e-19
julia> x - x
0.0 ± 0.0
Yes, this is expected and actually a desired behaviour: it allows us to distinguish between two different measurements that share by chance the same value and uncertainty (the first case in your example) from two quantities that are actually the same measurement (the second case in your example).
This is also explained in the documentation, see https://juliaphysics.github.io/Measurements.jl/stable/usage/#Usage-1 (in particular the "Note" box and the "Correlation Between Variables" section)