I am puzzled by a sentence:
A is a function of B, which depends on C.
My question is:
Which depends on C, A or B?
In theory, relative pronouns can refer to any word. So it could be A or B. However, the closest word is usually the most likely candidate. Moreover, if the intention had been "A depends on C", one would expect this elliptical construction:
A is a function of B and [it] depends on C.
This is unambiguous, because there are two parallel clauses, and so the subject of both verbs has to be the same (A). Since your example does not use this obvious construction, it is highly likely that it is B that depends on C.