Re: NIntegrate Precision

• To: mathgroup at smc.vnet.net
• Subject: [mg30869] Re: NIntegrate Precision
• From: "Allan Hayes" <hay at haystack.demon.co.uk>
• Date: Fri, 21 Sep 2001 04:04:07 -0400 (EDT)
• References: <9oc85h$g35$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

Victor,
np means that the value is only guaranteed to "precision" p
That is that it is only guaranteed to lie between  n - Abs[n] 10^-p and n +
Abs[n] .
10^-p .
(note that we are here dealing with relative error).
Please note that it is the error that might be introduced during its
calculations that Mathematica is reporting on - you are responsible for the
input.

n  means that Mathematica has been working with machine numbers and has not
bothered to compute the precision.
Unfortunately you if you ask for Precision[n] you will get
$MachinePrecision, usually 16 as though n were the same as n16 -- this is misleading. When you set WorkingPrecision ->20 (anything bigger then$MachinePrecision
will do) then Mathematica computes internally to precision 20 or more, keeps
track of the precision, and gives you a result np, to be interpreted as
above.

For more see Help Browser>Demos>Numerics Report

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Victor Kowalenko" <victork at csse.monash.edu.au> wrote in message
news:9oc85h$g35$1 at smc.vnet.net...
> I am interested in obtaining very high precision answers to
> Mellin-Barnes integrals using at the Compaq Grendel supercomputer at
> the Victorian Partnership for Advanced Computing in Australia.
> Typically, I am using NIntegrate to evaluate the contour integrals
> along the imaginary axis with integrands that are of the following
> form:
>
> (-\exp(i\pi/2)/z)^s \Gamma(s-\nu+1/2) \Gamma(s+\nu +1/2)/(\exp(i\pi
> s)-\exp(-i\pis)). I create a module that sets s=c+r\exp(i \theta)
> and invokes the NIntegrate procedure for r ranging from 0 to \infty.
> MinRecursion and MaxRecursion are set equal to 3 and 10 respectively
> while WorkingPrecision is set equal to wp. The module calls NINtegrate
> twice with \theta equal to -\pi/2 and \pi/2 and subtracts the two
> results. The module is set equal to a function with variables z
> (typically equal to \exp(49i\pi/100)/2, \nu (initially equal to 1/4),
> \nu (equal to 1/3, but will become complex) and wp. When wp is set
> equal to 11, I get a result in FullForm of
>
> Complex[-0.051659811688484825, -1.185784385161031]
>
> For wp=16 I get the same result. However, when I put wp equal to 20
> I get
>
>
Complex[-0.051659811688475977097400099110.72885,-1.185784385161015463516737
647712.0893]
>
> I am mystified by what `10.7285 means. In addition the latter value
> seems to have less precision than the former values although the
> precision is higher. I would have expected the discrepancy to occur
> at a high level of precision, although I suspect the last value may be
> more accurate than the previous two results. Are you able to shed any
> light on this conundrum?
>
>

• Prev by Date: ReadList, mix Words & Numbers?
• Next by Date: Use of Mathematica under UNIx
• Previous by thread: RE: NIntegrate Precision
• Next by thread: Q: Solving econometric models