BracedErrors.bracederrorMethod

bracederror(μ::Real, σ::NTuple{N,Real}; dec::Int = 2, suff::NTuple{N,String} = ntuple(i->"", N), bracket::NTuple{N,Symbol} = ntuple(i->:r, N)) Providing a value μ and a tuple of errors σ it creates a string with the value followed by the errors in brackets.

This notation is commonly used in sciencific papers and this function provide an automated way of getting the appropriate string.

Keyword Arguments

  • dec::Int = 2: number of decimals to round the errors to
  • suff::NTuple{AbstractString} = ("",): optional suffix after the brackets
  • bracket::NTuple{Symbol} = :r: type of the brackets
  • delim = ".": the delimeter string

bracket can take the values: [:a, :l, :^, :, :s, :r, :q] which correspond to ["<", "|", "^{", "{", "[", "(", "{"].

For conviniece following method are also added: bracederror(μ::Real, σ::Real; dec::Int = 2, suff::String = "", bracket::Symbol = :r, kwargs...)bracederror(μ::Real, σ::Real...; dec::Int = 2, suff = ntuple(i->"",length(σ)), bracket = ntuple(i->:r, length(σ)), kwargs...)