I am not sure if what I want to do can be done, but I thought to ask anyway.
Note: I already have in hand a workaround, I was just wondering for the power/simplicity that Mathematica may provide.
Problem: Suppose that I have in hand a polynomial in
x, y, z and only products between
x,, z and
y, z occur, e.g.
p = Pi x*z + Zeta x^2*z + 123/7 z + 1/2 x + 5 y + 9/2 y*z + 3 y^5*z + 1/Pi* z^4,
where I put some random constant coefficients in front of every term.
Now suppose, I have a homemade function that only executes "stuff" on numerical/numbers such as
19/2. If I apply that function (e.g.
myF /@ p) then it doesn't do "the job" because it can't handle the variables
Is there a way when I do
myF /@ p to actually get
myF /@ p = myF[Pi] x*z + myF[Zeta] x^2*z + myF[123/7] z + myF[1/2] x + myF y + myF[9/2] y*z + myF y^5*z + myF[1/Pi]* z^4
I know that the build in function
N, has attribute
NHoldAll and this is how it performs a similar to the problem, job.
Comment: No I will not give you more information (!) about the function
myF because I want this to be as generic as it gets. If it has a solution, it is nice to be known and applied to any kind of "home-brewed" function since I can think of a big class of functions that would a enjoy such an attribute.