MathGroup Archive 1998

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

Search the Archive

Re: High precision numbers and Plot[] ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13702] Re: High precision numbers and Plot[] ?
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Sat, 15 Aug 1998 04:39:30 -0400
  • Organization: University of Western Australia
  • References: <6qp3b3$ajn@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

a_kowald wrote:

> I try to plot a function where I have to use high precision numbers.
> That means to get the correct answer I have to use N[f,50]. I set the
> Compiled option of plot to false and tried:
> 
> Plot[N[f,50], {i, start, end}, Compiled -> False]
> 
> However, this doesn't work. The result is the same as:
> Plot[f,{i,start,end}]
> 
> Any idea what I'm doing wrong ?

The likely problem is that the table of values generated by Plot is at
machine precision which overrides the use of N[f,50]. Here is one
workaround by way of an example.  Compare

  In[1]:= Plot[LegendreP[50], {x, 0, 1}, PlotRange -> All];

with

  In[9]:= Plot[LegendreP[50, SetPrecision[x, 30]], {x, 0, 1}, 
	PlotRange -> All, Compiled -> False]; 

Cheers,
	Paul 

____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul at physics.uwa.edu.au  AUSTRALIA                       
http://www.physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________


  • Prev by Date: Re: recursive relation problem ?
  • Next by Date: Re: Request for help: working with multi-level lists
  • Previous by thread: Re: High precision numbers and Plot[] ?
  • Next by thread: Printing problems - Mac.