Here's a simple example
Suppose have the permanent relation that z is proportional to xy^2, for real numbers s.
z = s x y^2
Now, we are interested in functions of x,y,z, say:
f[x_,y_,z_] = Sin[x z]-(1-y z Cos[z])^(-1)
Let's say for reasons of interpretation of the system, we do not want to simply replace z by sxy^2 and make a new function always
g[x_,y_,s_] = Sin[s x^2 y^2] - (1-s x y^3 Cos[s x y^2])^(-1)
This same thing could have been obtained from the first function by just calling:
f[x, y, s x y^2]
Instead, what I would like to be able to do, is retain the full f[x_,y_,z_], unless I have specifically asked for numerical values of x and y. What I would like is to get
f[x, y, z] = Sin[x z]-(1-y z Cos[z])^(-1)
to do something a little different. If the first two arguments are numerical, I would like the function to treat the third argument as the proportionality constant s, instead of as z itself.
I suppose I could accomplish this with some kind of If statement? If those arguments are NumberQ false, take the 3rd argument to be z, and if they are both NumberQ True, take the third argument to be s, as in z=s x y^2?
I suppose this question really reduces to can I make a conditional function which differs depending on the argument type?