Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: Mathematica 4.2 & Strange Plot results

  • To: mathgroup at
  • Subject: [mg36328] Re: Mathematica 4.2 & Strange Plot results
  • From: "Ian McInnes" <ian at>
  • Date: Mon, 2 Sep 2002 04:08:35 -0400 (EDT)
  • References: <akn016$ljr$>
  • Sender: owner-wri-mathgroup at

This results from:
a) the fact that Mathematica implements division as multiplication and
b) the use of machine precision for plotting the graph
c) the default scaling of the y axis revealing the resultant inaccuracies

Although Sin[x]/Sin[x] gives 1 when evaluated symbolically (x undefined),
substituting a floating-point value for x results in composite division
being performed numerically, with consequent inaccuracy. This can be
verified by the following:
In[1]:= FullForm[HoldForm[Sin[x]/Sin[x]]
Out[1]//FullForm= HoldForm[Times[Sin[x], Power[Sin[x], -1]]]

By default, Mathematica scales the y axis such that the small discrepancies
are visible. The PlotRange option may be given to explicitly specify the
range for the y axis (for example PlotRange->{0, 2}).

Ian McInnes.

"Ken Thomson" <someone at> wrote in message
news:akn016$ljr$1 at
> I would expect that
> Plot[Sin[x]/Sin[x], {x, -2.5, -1.5}]
> would produce a horizontal line at y=1.
> However, on my Windows XP computer it produces a graph where the y value
> less than 1 at several points.  Most notibly between x=-1.6 and x=-1.8
> Is this just an isolated case? Or does it happen to others?  If so - why?
> Regards,
> Ken.

  • Prev by Date: Re: L2 inner product. Integrate and Conjugate?
  • Next by Date: Re: L2 inner product. Integrate and Conjugate?
  • Previous by thread: Bug in Times?! - Nonzero 0*SeriesData[..]
  • Next by thread: RE: Re: Mathematica 4.2 & Strange Plot results