File indexing completed on 2024-11-25 02:29:52
0001
0002
0003
0004 from uncertainties import ufloat
0005 x = ufloat(2, 0.25)
0006 print(x)
0007 square = x**2
0008 print(square)
0009 print(square.nominal_value)
0010 print(square.std_dev)
0011 print(square - x*x)
0012 from uncertainties.umath import *
0013 print(sin(1+x**2))
0014 print((2*x+1000).derivatives[x])
0015 from uncertainties import unumpy
0016 random_vars = unumpy.uarray([1, 2], [0.1, 0.2])
0017 print(random_vars)
0018 print(random_vars.mean())
0019 print(unumpy.cos(random_vars))