I'm trying to use the N
function to find the percent error between a function and a rounded value of that function. The code looks something like this.
In[20]:= Tan[10°]
Out[20]= Tan[10°]
In[21]:= N[Tan[10°]]
Out[21]= 0.176327
In[22]:= N[%20] - N[%20, 4]
Out[22]= 0.
In[23]:= N[%22]
Out[23]= 0.
Basically, Mathematica is not recognizing these differences, and thinks they're 0 even when they're not. Does anyone have a workaround for this? I'll probably use IntegerPart
if nobody has any thoughts.
Thanks!