The general issue of how errors in a function of more than one random variable are passed through in a function of those variables is called "error propagation", which is a tag on this site. This page gives a pretty thorough explanation for the ratio case. Follow the
error-propagation tag on this site, or do web searches for "error propagation" and "product" for the general case (as the $C$ or $D$ terms in the denominator can be written as products of the numerator with functions $1/C$, $1/D$, etc.)
Note that you get into trouble if any of the random variables in the denominator have mean values close to 0, and that correlations among the random variables can make it difficult to express a simple formula.
If errors in $X$ and $Y$ are approximately proportional to their values, then you can analyze the logarithm of the ratio, and the complicated product calculations become a simple additive case, $log(f)= log(X) - log(Y)$ for the original question about the ratio $X/Y$. Then the standard law for the variance of a sum/difference of random variables applies. For the more general case in the edited question, logarithms similarly simplify if appropriate.