Numeric error propagation: Difference between revisions

m
mNo edit summary
Line 1,475:
 
=={{header|Julia}}==
=== Using MeasurementMeasurements library ===
<lang julia>
using Measurements
Line 1,489:
@show d.val, d.err
</lang>{{out}}
The MeasurementMeasurements library will round to correct decimal place precision when displaying tolerances, so the fields are shown to show the calculations are equivalent.
<pre>
d = 111.8 ± 2.5
(d.val, d.err) = (111.80339887498948, 2.4871670631463423)
</pre>
 
=== With custom module ===
<lang julia>module NumericError
4,105

edits