MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Trig Error




Loren Dill wrote:
 ----------
|I discovered an error in the trigonometry functions of all places. |
|The exact  value of Cot [11/2 Pi] is zero, but Mathematica 3.0 gives
|ComplexInfinity (!) for the nearly equivalent
|Cot[17.2787595947438628115445386080397220812326`30.2181]. |
|Has anyone else noticed similar trig errors? |
|Loren Dill
|

Watch the precision of the output fall as the precision of the argument
goes  down.

In[1]:=
Cot[17.2787`16.]//InputForm

Out[1]//InputForm=
0.00005959474393336246201506`10.5377

In[2]:=
Cot[17.2787`8.]//InputForm

Out[2]//InputForm=
0.000059594743933362`2.5377

In[3]:=
Cot[17.2787`7.]//InputForm

Out[3]//InputForm=
0.00005959474393336`1.5377

In[4]:=
Cot[17.2787`6.]//InputForm

Out[4]//InputForm=
0.0000595947439334`0.5377

In[5]:=
Cot[17.2787`5.5]//InputForm

Out[5]//InputForm=
0.000059594743933`0.0377

In[6]:=
Cot[17.2787`5.465]//InputForm

Out[6]//InputForm=
0.000059594743933`0.0027

In[7]:=
Cot[17.2787`5.46]

Out[7]=
ComplexInfinity

It seems the result in Out[7]
would have had negative precision.
This makes no sense, so Mathematica returns ComplexInfinity   (just my 
guess).

However, it seems to me Mathematica is relatively conservative when it 
determines how much precision the output has.  I suppose they had to
trade  off execution time with better precision in the output.  Also
when they say  the output has some amount of precision, they want to be
absolutely certain  the indicated precision is correct.  Maybe the
folks at Wolfram Research  will have further comment.

Ted Ersek




  • Prev by Date: Problem with EPSTIFF
  • Next by Date: efficiency of Function
  • Prev by thread: Re: Trig Error
  • Next by thread: Bug in Mathematica v3 PICT converter