Deborah.Sarah.AvgErrFormatter
Deborah.Sarah.AvgErrFormatter.avgerr_e2d — Methodavgerr_e2d(
censtr::String,
errstr::String
) -> StringFormat a central value and its error into a compact string using parenthetical $\pm$ notation.
This function takes the central value and error as strings in scientific notation (e.g., "1.234e+01", "3.2e-01"), and returns a formatted string such as "12.3(3)". It handles different scales and adds a * suffix if the error dominates.
Arguments
censtr::String: Central value string in scientific notation.errstr::String: Error value string in scientific notation.
Returns
String: Formatted result like"1.23(45)"or"1.2(3) *"depending on magnitude and dominance.
Deborah.Sarah.AvgErrFormatter.avgerr_e2d_from_float — Methodavgerr_e2d_from_float(
cen::Float64,
err::Float64
) -> StringConvert a central value and its error from Float64 into a compact exponential $\pm$ string.
This is a wrapper for avgerr_e2d that takes float inputs and internally converts them to scientific notation strings with high precision before formatting.
Arguments
cen::Float64: Central value.err::Float64: Error value.
Returns
String: Formatted output like"1.23(4)e+02"or"1.2(3) *".
Deborah.Sarah.AvgErrFormatter.round_sig — Functionround_sig(
x::Float64,
sig::Int=2
) -> Float64Round a number to a specified number of significant digits.
Arguments
x::Float64: Number to round.sig::Int=2: Number of significant digits (default:2).
Returns
Float64: The number rounded to the specified significant digits.