I typed a function :
f := Tan[(1/a)*Log[(Sqrt[x^2 + y^2])]] - y/x
I assigned values:
a = 6.045059888;
x = 8.36488;
y = 1.836539;
When I used
Evaluate[f]
it gave me a value of 0.15145
However, the correct value (verified on calculator and Excel), is supposed to be -0.064. Anyone know what is wrong with this?
Regards Corse
Loghas baseE, not10. WithLog10you will get what you need. P.s.Evaluateis redundant here. – Kuba Apr 09 '15 at 07:39f. p.s. If you want to create the function, maybe better use named argumentsf[a_,x_, y_]:=...because your way works only if a x y were not defined earlier. – Kuba Apr 09 '15 at 07:48Evaluate[f]just yieldsf. strange – Corse Apr 09 '15 at 07:59Remove[f], then redefine your function using thef[a_, x_, y_]:=...form, then apply your newly defined functionf[a,x,y]. – TransferOrbit Apr 09 '15 at 08:18