Hi all,

I'm really happy to announce availability of Measurements.jl 
<https://github.com/giordano/Measurements.jl>, v0.1.1, a full-fledged 
uncertainty 
propagation <https://en.wikipedia.org/wiki/Propagation_of_uncertainty> 
library.  This is the list of features:

   - Support for most mathematical operations available in Julia involving 
   real and complex numbers. All existing functions that accept 
   AbstractFloat (and Complex{AbstractFloat}) arguments and internally use 
   already supported functions can in turn perform calculations involving 
   numbers with uncertainties without being redefined. This greatly enhances 
   the power of Measurements.jl without effort for the users
   - Functional correlation between variables is correctly handled, so x-x 
   == zero(x), x/x == one(x), tan(x) == sin(x)/cos(x), etc...
   - Support for arbitrary precision 
   
<http://docs.julialang.org/en/stable/manual/integers-and-floating-point-numbers/#arbitrary-precision-arithmetic>
 
   numbers with uncertainties (though this may not be very useful for 
   quantities that are intrinsically imprecise)
   - Define arrays of measurements and perform calculations with them
   - Propagate uncertainty for any function of real arguments (including 
   functions based on C/Fortran calls 
   <http://docs.julialang.org/en/stable/manual/calling-c-and-fortran-code/>), 
   using @uncertain macro 
   <http://docs.julialang.org/en/stable/manual/metaprogramming/>
   - Functions to get the derivative and the gradient of an expression with 
   respect to one or more independent measurements
   - Functions to calculate standard score 
   <https://en.wikipedia.org/wiki/Standard_score> and weighted mean 
   <https://en.wikipedia.org/wiki/Weighted_arithmetic_mean>
   - Easy way to attach the uncertainty to a number using ± sign

The complete manual of the package is available at 
http://measurementsjl.readthedocs.io/ with many helpful examples.  The 
package is released under terms of MIT "Expat" license.

Looking at the list of uncertainty propagation software 
<https://en.wikipedia.org/wiki/List_of_uncertainty_propagation_software> on 
Wikipedia, it seems this is one of the few packages supporting complex 
numbers with uncertainties and operations with arrays, and the only one 
supporting arbitrary-precision arithmetic.

What impressed me most during the development of the package, is that 
thanks to how Julia is designed I actually didn't do anything to gain 
support for complex measurements, arbitrary-precision arithmetic and 
operations with array.  There is not a single line in Measurements.jl's 
code to provide support for all these features.  Only for complex numbers I 
had to choose wisely the subtyping of new Measurement type (and Steven 
Johnson helped me on this, thanks!).  For comparison, Python package 
uncertainties <https://pythonhosted.org/uncertainties/> doesn't support 
complex numbers with uncertainties nor multiple precision arithmetic, and 
you need to load a separate module (so the developer had to write specif 
code for that) in order perform operations with NumPy arrays.

Regarding performance, operations with Measurements.jl can be up to 50 
times faster than with uncertainties package.  Let alone that in 
Measurements.jl you can simply write 42 ± 1.3 in order to define a new 
quantity with uncertainty (this nifty feature was suggested me on this 
mailing list, thanks Lucas Magno!).

Bye,
Mosè

Reply via email to