Re: Increased Precision in Plot?

*To*: mathgroup at smc.vnet.net*Subject*: [mg34701] Re: [mg34684] Increased Precision in Plot?*From*: David Withoff <withoff at wolfram.com>*Date*: Sat, 1 Jun 2002 04:29:12 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

> The command > > f[t_]=Nest[1 - Integrate[2s(#/.t->s),{s, 0, t}]&, Cos[t], > 12]//Simplify > > returns a fairly innocent-looking result. However, evaluation (or > plotting) of the result with default precision produces garbage; for > example: > > In[1]:= f[.5] > Out[1]:= 0.875 > > In[2]:= N[f[1/2]] > Out[2]:= 0.625 > > In[3]:= N[f[1/2],17] > Out[3]:= 0.77880078307140487 > > My question is this: How can I get Plot to graph such a function with > increased precision, so that the graph isn't overwhelmed by noise? > > Thanks in advance, > > Selwyn Hollis Here is one possibility: Plot[Block[{tt = SetPrecision[t, 100]}, f[tt]], {t, 0, 1}, Compiled -> False] which could be compared with Plot[f[t], {t, 0, 1}] to see the effect. There are many variants of this. It has been suggested that since Plot is essentially a numerical function (like NIntegrate) it could have a WorkingPrecision option, which would provide another way of addressing this issue. Dave Withoff Wolfram Research