|
# TODO: handle edge case lo == hi when the nominal value is 0 |
# - Given [lo, hi], interpret as ±1σ around μ = (lo+hi)/2, σ = (hi-lo)/2.
lo_f = float(lo)
hi_f = float(hi)
# TODO: handle edge case lo == hi when the nominal value is 0
@assert hi_f > lo_f "hi must be greater than lo"
μ = (lo_f + hi_f) / 2
σ = (hi_f - lo_f) / 2