;+ ; NAME: product_errprop.pro ; PURPOSE: ; Implements the error propagation formula for the product of two ; numbers, assumed to have no correlation ; ; INPUTS: ; KEYWORDS: ; OUTPUTS: ; ; HISTORY: ; Began 2002-10-15 17:33:28 by Marshall Perrin ;- function product_errprop,a,b,erra,errb,ratio=ratio if not(keyword_set(ratio)) then prod = a*b else prod=a/b ;print,"prod is ",prod ;print,a,erra ;print,(erra/a)^2,errb^2/b^2 return,sqrt( (erra^2/a^2+errb^2/b^2))*abs(prod) end