Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6636

Re: Bad Precision output for SphericaBesselY and

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!newspump.sol.net!posts.news.twtelecom.net!nnrp2.twtelecom.net!not-for-mail
From Richard Fateman <fateman@cs.berkeley.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Bad Precision output for SphericaBesselY and
Date Wed, 23 Nov 2011 12:03:56 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <jainfc$ees$1@smc.vnet.net> (permalink)
References <201111221036.FAA28073@smc.vnet.net> <jag4aa$6n$1@smc.vnet.net>
Lines 74
NNTP-Posting-Date 23 Nov 2011 11:08:14 GMT
NNTP-Posting-Host 01607035.news.twtelecom.net
X-Trace DXC=B\e7[cAY64[KUUGJ=jJOWUC_A=>8kQj6]m^eQlV`f18W:Xj>;_IblDPEFiONJ7[GoV<SJa<@d7`]R
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:6636

Show key headers only | View raw


On 11/22/2011 4:24 AM, Oliver Ruebenkoenig wrote:
> On Tue, 22 Nov 2011, Antonio Alvaro Ranha Neves wrote:
>
>> Dear users,
>>
>> Recently I'm working with precision calculations of spherical functions. Example, let,
>>
>> n = 150
>> x = SetPrecision[120.3, 100]
>> BesselY[n + 1/2, x] // Precision
>> BesselJ[n+ 1/2, x] // Precision
>>
>>
>> Yields 67.2708 and 96.9297 respectively. The two questions are:
>> 1) Why does BesselY results in a worse than BesselJ?
>> 2) How to redefine, BesselY to automatically output a result with a desired pecision?
>>
>> Note: Simply using N[expr,90], does not yield a result of expr with 90 precision but maintains the same 67.2708.
>>
>> Thanks,
>> Antonio
>>
>>
>>
>
> Antonio,
>
> you could use exact arithmetic and only later derive the numeric
> quantities.
>
> n = 150
> x = 1203/10
> BesselY[n + 1/2, x] // Precision
> BesselJ[n + 1/2, x] // Precision
>
> N[BesselY[n + 1/2, x], 100] // Precision
> N[BesselJ[n + 1/2, x], 100] // Precision
>
> gives a precision of 100. for both.
>
> Oliver
>

First of all, you should realize that x is approximately
120.299999999999997157829056959599256515502929687500000000000000000000\
0000000000000000000000000000000

and perhaps you mean
z=SetPrecision[1203/10, 100]  which is
120.300000000000000000000000000000000000000000000000000000000000000000\
0000000000000000000000000000000

The way Mathematica works is that it assumes that all the digits beyond 
100 are garbage, instead of (say) filling with zero.

This means it sometimes operates as if it has insufficient information 
in the input to satisfy your demands for precision in the output.

If you want to find
100 digits in the answer, you could try using exact numbers until the 
last N operation:

N[BesselJ[150+1/2, 1203/10,  100]

Which provides 100 digits of precision.

RJF






Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: Bad Precision output for SphericaBesselY and Oliver Ruebenkoenig <ruebenko@wolfram.com> - 2011-11-22 12:24 +0000
  Re: Bad Precision output for SphericaBesselY and Richard Fateman <fateman@cs.berkeley.edu> - 2011-11-23 12:03 +0000

csiph-web