Re: Displaying many digits
- To: mathgroup at smc.vnet.net
- Subject: [mg40937] Re: [mg40933] Displaying many digits
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Fri, 25 Apr 2003 08:01:50 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
What you are doing does not make sense (within Mathamatica conventions of course). Once you used a machine precision number (that's what 3.0 means in Mathematica) as input you can't expect to get 20 digits of precision in your output. In fact all you get is: In[12]:= N[BesselJ[1,3.],20]//InputForm Out[12]//InputForm= 0.3390589585259365 (you can see all 16 digits if you use InputForm). The precision is of course $MachinePrecision: In[13]:= Precision[%] Out[13]= 16 If you really want to get 20 digits of precision you should either use exact input: In[14]:= N[BesselJ[1,3],20] Out[14]= 0.33905895852593645893 In[15]:= Precision[%] Out[15]= 20 or at least input with more than 20 digits of precision: In[16]:= N[BesselJ[1,3`21],20] Out[16]= 0.33905895852593645893 In[17]:= Precision[%] Out[17]= 20 Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/ On Thursday, April 24, 2003, at 06:30 pm, Stepan Yakovenko wrote: > HI! > > And what if I want to see many BesselJ's digits ? > > In[2]:= N[BesselJ[1,3.],20] > Out[2]= 0.339059 > > -- > Best regards, > Stepan mailto:yakovenko at ngs.ru > > > >