I need to solve a system of equations. It would be too long to solve it exactly, so I need to approximate by numbers the coefficients.
The problem is the following :
In[51]:= N[1/3*gamma[1], 20]
Out[51]= 0.33333333333333333333 gamma[1.0000000000000000000]
As you can see, the indice 1 in gamma[1] is also approximated. But I don't want the indices to be approximated. (In fact I'm solving a linear system of equations and this behavior can be a little problematic).
How to tell mathematica to only approximate coefficients of the equations but not indices inside brackets ?
gammabe Rational? if not, you can use this:N[expr] /. gamma[x_] :> gamma[Floor[x]]. – Anjan Kumar Jul 12 '17 at 12:31NHold...attributes. Related: Apply N only outside a certain function, Is there a way to prevent N from being applied to all parts of an expression – jkuczm Jul 12 '17 at 13:37