Compositional analysis of the effects of uncertainty on computations