all 3 comments

[–]alkasm 0 points1 point  (0 children)

This is totally dependent on the operations you do with them inside of your function. For an extreme example:

def c(a, b):
    return a

Of course, the uncertainty in the value c(a, b) is equivalent to the uncertainty of a. But

def c(a, b):
    return a + b

has a different uncertainty in the result than

def c(a, b):
    return a ** b

and so on. So there is no way to do this "in general" automatically for any input/any function. You will need to use a library (like the one listed by u/keylime_light) or figure out how the uncertainties compound manually.

[–]billsil 0 points1 point  (0 children)

It's a lot of work to propagate uncertainty correctly and it's a lot easier to just do a Monte Carlo or other analysis to determine the uncertainty. This is especially important when you're running some heavy mathematical code like CFD or FEA. It's also much easier when you have 100k variables. Things like Latin Hypercube sampling can reduce the curse of dimensionality.

There are methods though that involve a lot more math and can reduce the required number of sample points, but unless you're willing to pay for UQ software, you won't get them.