| Author |
Comment/Response |
Kevin
|
10/12/07 4:28pm
I am using Mathematica 6.0.0 and have run into what appears to be an inconsistency with the ArcCos function. ArcCos[1] returns 0. But ArcCos[exp], where exp evaluates to 1, returns a complex number not equal to 0. Below I copied a Mathematica notebook that illustrates my question. I have also attached the notebook to this message.
In[1]:= (* Compute an expression *)
a = 17.0677;
b = 1;
c = 18.0677;
exp = (-a^2 + b^2 + c^2)/(2 b c)
Out[4]= 1.
In[5]:= (* Verify that the expression equals 1 *)
exp == 1
Out[5]= True
In[6]:= (* ArcCos of 1 equals 0, as expected *)
ArcCos[1]
Out[6]= 0
In[7]:= (* But ArcCos of our expression doesn't equal 1 *)
ArcCos[exp]
Out[7]= 0.+ 2.10734*10^-8 \[ImaginaryI]
Attachment: ArcCos.nb, URL: , |
|