JuliaPhysics / Measurements.jl

Error propagation calculator and library for physical measurements. It supports real and complex numbers with uncertainty, arbitrary precision calculations, operations with arrays, and numerical integration.

Home Page:https://juliaphysics.github.io/Measurements.jl/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

making measurements work with Printf

longemen3000 opened this issue · comments

in the work of making Optim work with measurements (and fixing #100 ), i found that the show error is due to a measurement numbers being incapable of being formatted by @sprintf macro. a stopgap solution is to use Printf.tofloat(x::Measurement) = tofloat(value(x)) but it would be great to apply the formatting to both the value and the uncertainty, any idea on how to do that?