floating point degree of precision in numerical quadrature

25
Floating Point Degree of Floating Point Degree of Precision in Numerical Precision in Numerical Quadrature Quadrature Sanda Adam & Gheorghe Adam Sanda Adam & Gheorghe Adam LIT-JINR Dubna & IFIN-HH Bucharest LIT-JINR Dubna & IFIN-HH Bucharest Ro-LCG Workshop Ro-LCG Workshop Bucharest Bucharest , , Romania Romania November 29-30, November 29-30, 2011 2011

Upload: rosa

Post on 14-Jan-2016

76 views

Category:

Documents


0 download

DESCRIPTION

Floating Point Degree of Precision in Numerical Quadrature. Sanda Adam & Gheorghe Adam LIT-JINR Dubna & IFIN-HH Bucharest. Ro-LCG Workshop Bucharest , Romania November 29-30, 2011. Overview. Bayesian automatic adaptive quadrature Interpolatory quadrature sums - PowerPoint PPT Presentation

TRANSCRIPT

Floating Point Degree of Precision Floating Point Degree of Precision in Numerical Quadraturein Numerical Quadrature

Sanda Adam & Gheorghe AdamSanda Adam & Gheorghe AdamLIT-JINR Dubna & IFIN-HH BucharestLIT-JINR Dubna & IFIN-HH Bucharest

Ro-LCG WorkshopRo-LCG WorkshopBucharestBucharest,, Romania Romania November 29-30,November 29-30, 2011 2011

OverviewOverview

Bayesian automatic adaptive quadratureBayesian automatic adaptive quadrature Interpolatory quadrature sumsInterpolatory quadrature sums Floating point degree of precisionFloating point degree of precision Features of the floating point degree of precisionFeatures of the floating point degree of precision ConclusionsConclusions

Mathematical problemMathematical problem

Given the proper (or improper) Riemann integral

we seek a globally adaptive numerical solution of it within input accuracy specifications

i.e.,

[ , ] ( ) ( ) , -b

aI a b f w x f x dx a b

, 0Q E

{ 0, 0}r a

| [ , ] | max{ | [ , ] |, } max{ | |, }r a r aI a b f Q E I a b f Q

Automatic adaptive quadratureAutomatic adaptive quadrature

The derivation of the quantities QQ and E E is done within

an approach based on two pillars:

(i) A subrange subdivision strategysubrange subdivision strategy of the integration

domain [a,ba,b] implementing the ordering of the

already generated subranges into a priority queuepriority queue.

(ii) A convenient local quadrature rulelocal quadrature rule which yields,

over each subrange a local pair {q, eq, e} for the

quadrature sumquadrature sum (qq) and its associated local errorlocal error

estimateestimate (ee > 0) respectively.

Then QQ & E E are obtained as sums of q & e q & e over subranges.

The Bayesian analysis checks the absence of the following kinds of unacceptable integrand features: 1. Catastrophic cancellation by subtraction2. Range of variation of the integrand beyond the

maximally allowed polynomial threshold3. Occurrence of integrand oscillations beyond the

resolving power of the current integrand profile4. Occurrence of inner isolated integrand discontinuities5. Occurrence of unsolvable irregular behaviour of the

integrand

Questions within Bayesian analysisQuestions within Bayesian analysis

Lateral close proximity neighbourhoods Lateral close proximity neighbourhoods

GK 7-15GK 7-15

GK 10-21GK 10-21

CC 15-31CC 15-31

Consist of sixsix quadrature knots which produce information over distances equating the inter-knot distances at subrange centre.

Central close proximity neighbourhoods Central close proximity neighbourhoods

GK 7-15GK 7-15

GK 10-21GK 10-21

CC 15-31CC 15-31

Consist of ninenine quadrature knots which produce information over distances equating the inter-knot distances at subrange centre.

OverviewOverview

Bayesian automatic adaptive quadratureBayesian automatic adaptive quadrature Interpolatory quadrature sumsInterpolatory quadrature sums

Floating point degree of precisionFloating point degree of precision Features of the floating point degree of precisionFeatures of the floating point degree of precision ConclusionsConclusions

Interpolatory quadrature sumsInterpolatory quadrature sums

An interpolatory quadrature sum approximates a proper An interpolatory quadrature sum approximates a proper or improper one-dimensional Riemann integral,or improper one-dimensional Riemann integral,

by means of an interpolatory algebraic polynomial,by means of an interpolatory algebraic polynomial,

the values of which equate those of the integrand function the values of which equate those of the integrand function at a specific set of quadrature knots ,at a specific set of quadrature knots ,

[ , ] ( )I f f x dx

1[ , ] [ , ]n nq f I p

( )f xkx

pn(xk) = f (xk), k = 0, 1, ..., n..

Algebraic Degree of PrecisionAlgebraic Degree of Precision

The quadrature sum solves exactly the The quadrature sum solves exactly the polynomial integrals over the fundamental power set,polynomial integrals over the fundamental power set,

The maximum degree , at which these identities hold, The maximum degree , at which these identities hold, defines the defines the algebraic degree of precisionalgebraic degree of precision of the quadrature of the quadrature sum .sum .In the literature, the algebraic degree of precision, In the literature, the algebraic degree of precision, dd, is , is considered to be a considered to be a specificspecific universal parameteruniversal parameter of a given of a given interpolatory quadrature sum, irrespective of the extent and interpolatory quadrature sum, irrespective of the extent and localization of the integration domain on the real axis.localization of the integration domain on the real axis.

1[ , ]nq f

1[ , ] [ , ] , 0,1, , , [ , ]k knq x I x k d R

1[ , ]nq f

d

OverviewOverview

Bayesian automatic adaptive quadratureBayesian automatic adaptive quadrature Interpolatory quadrature sumsInterpolatory quadrature sums

Floating point degree of precisionFloating point degree of precision Features of the floating point degree of precisionFeatures of the floating point degree of precision ConclusionsConclusions

Floating Point Degree of Precision Floating Point Degree of Precision (1)(1)

In In floating point computationsfloating point computations, the above property of the , the above property of the monomials of bringing distinct, non-negligible monomials of bringing distinct, non-negligible contributions to contributions to σσmm may get may get infringedinfringed both at integration both at integration limits limits ββ << 1 << 1 and and ββ >> 1 >> 1 . .The maximum degree at which the identity of the The maximum degree at which the identity of the individual monomial contributions is preserved in floating individual monomial contributions is preserved in floating point computations defines the point computations defines the floating point degree of floating point degree of precisionprecision of the quadrature sum. of the quadrature sum.Its definition is formalized in the next two slides.Its definition is formalized in the next two slides.

lx

fpd d

In the calculation over of the set of probe integralsIn the calculation over of the set of probe integrals

each monomial entering the integrand brings a each monomial entering the integrand brings a distinct, non-negligibledistinct, non-negligible, contribution to ., contribution to .

0[0, ] , ( ) , 0, 0,1, ,

m lm m m l

I x x m d

R

lx ( )m xm

Floating Point Degree of Precision Floating Point Degree of Precision (2(2aa))1. Let denote the integration range of interest.1. Let denote the integration range of interest.2. Let , a quadrature sum of algebraic degree of 2. Let , a quadrature sum of algebraic degree of

precision precision dd , be computed over a set of , be computed over a set of tt-bit floating -bit floating point machine numbers (point machine numbers (t t = = 52 in double precision).52 in double precision).

3. Let 3. Let ξξ > 0, let > 0, let flfl((aa) denote the floating point approximate) denote the floating point approximate of , and let [of , and let [aa] denote the ceiling of ] denote the ceiling of flfl((aa).).4. Let4. Let

where where

[ , ] R[ , ]q f

a R

0

0

iff [ , ]

[ln / ln ] iff

[ ln / ln ] iff

m M

m

M

d x x

d x

x

1/ 10 02 , , .t d

m M mx x x

Floating Point Degree of Precision Floating Point Degree of Precision (2(2bb))

5. For the integration range [5. For the integration range [αα, , ββ] we define] we define ,,

The quantities The quantities ddXX and and ddρρ are computed from 4. are computed from 4.

6. Then the 6. Then the floating point degree of precisionfloating point degree of precision, , associated to is the positive integerassociated to is the positive integer

fpd d[ , ]q f

max{ (| |), (| |)}, 0

(| | / ), 0 2.

X fl fl X

fl X

fp max{min{ , },3}Xd d d

OverviewOverview

Bayesian automatic adaptive quadratureBayesian automatic adaptive quadrature Interpolatory quadrature sumsInterpolatory quadrature sums Floating point degree of precisionFloating point degree of precision

Features of the floating point degree of precisionFeatures of the floating point degree of precision ConclusionsConclusions

Features of the Floating Point Degree of PrecisionFeatures of the Floating Point Degree of Precision

First, there is a manifold of integration ranges [α, βα, β] over which all the terms of the polynomials πm(x) are significant and contribute distinctly to the computed output. Then the floating point degree of precision, dfp equates the algebraic degree of precision, d. Second, in the case of arbitrarily placed on the real axis narrow integration intervals (characterized by the property that 0 < ρρ << 1), dfp << d, in agreement with the fact that the integrand properties inside [αα, ββ] are sufficiently well described by a low degree Taylor series expansion of f (x) around one of the subrange ends.

Features of the Floating Point Degree of PrecisionFeatures of the Floating Point Degree of Precision

Third, the occurrence of extremal X values (0 < X << 1 for integration intervals around the origin, or X >> 1 for very large integration intervals) result in dfp << d irrespective of the value of the parameter ρρ.• The case 0 < X << 1 is consistent with the observation that a low degree power series expansion around the origin approximate sufficiently well the integrand properties everywhere inside [α, βα, β].• The case X >> 1 corresponds to a sparse integrand discretization by the widely spaced from each other quadrature knots. Then the actual integrand behaviour inside [α, βα, β] is poorly approximated by this sparse integrand sampling except for the case when the integrand can be well approximated by a low degree polynomial.• The discussion at X >> 1 also points to the fact that the occur-rence of asymptotic tails of the integrand cannot be tackled sufficiently accurately by general purpose quadrature rules.

Features of the Floating Point Degree of PrecisionFeatures of the Floating Point Degree of Precision

The above general remarks are strengthened by the floating point degree of precision outputs obtained for specific quadrature sums. In what follows, results are reported for the GK 10-21 local quadrature rule, which is among the most attractive candidates for the implementation of the Bayesian automatic adaptive quadrature. The 21 Gauss-Kronrod abscissas result in an algebraic degree of precision d = 31.We have considered three illustrative cases: (i) Gliding integration range [0, 1] on the real axis.A family of 1024 integration ranges was defined. (ii) Inflating integration range [α, βα, β] over the real axis.A family of 1023 integration ranges illustrating this case has beenobtained from the sampling. (iii) Non-equivalence of the siblings in the binary subrange trees.We assume the case study integration domain [0, 2n].

Gauss-Kronrod 10-21local quadrature ruleGauss-Kronrod 10-21local quadrature rule

Features of the Floating Point Degree of PrecisionFeatures of the Floating Point Degree of Precision• Gliding integration rangesGliding integration ranges on the real axis.on the real axis.

Variation of the floating Variation of the floating point degree of precision point degree of precision of the GK 10-21 local of the GK 10-21 local quadrature rule over the quadrature rule over the gliding range gliding range [0, 1][0, 1] versus versus its distance j from the its distance j from the origin.origin. It isIt is show shownn that that ddfpfp = = dd = 31 at low = 31 at low jj values values

((j j = 0, 1, 2), then = 0, 1, 2), then ddfpfp

abruptly decreases at abruptly decreases at larger but small enough larger but small enough jj, , to show slower decreasing to show slower decreasing rates under the rates under the displacement of [0,1] far displacement of [0,1] far away from the origin, away from the origin, reaching a bottom value reaching a bottom value ddfpfp = 5 at 701 ≤ j ≤ 1023. = 5 at 701 ≤ j ≤ 1023.

Variation of the floating Variation of the floating point degree of precision point degree of precision of the GK 10-21 local of the GK 10-21 local quadrature rule over the quadrature rule over the gliding range gliding range [0, 1][0, 1] versus versus its distance j from the its distance j from the origin.origin. It isIt is show shownn that that ddfpfp = = dd = 31 at low = 31 at low jj values values

((j j = 0, 1, 2), then = 0, 1, 2), then ddfpfp

abruptly decreases at abruptly decreases at larger but small enough larger but small enough jj, , to show slower decreasing to show slower decreasing rates under the rates under the displacement of [0,1] far displacement of [0,1] far away from the origin, away from the origin, reaching a bottom value reaching a bottom value ddfpfp = 5 at 701 ≤ j ≤ 1023. = 5 at 701 ≤ j ≤ 1023.

Floating point degrees of precision of six families of gliding ranges of lengthsFloating point degrees of precision of six families of gliding ranges of lengths1, 1/2, 1/4, 1/8, 1/16,1/32, respectively, versus their distances j from the origin1, 1/2, 1/4, 1/8, 1/16,1/32, respectively, versus their distances j from the origin

Features of the Floating Point Degree of PrecisionFeatures of the Floating Point Degree of Precision• Inflating rangeInflating range [0,j][0,j] and gliding range and gliding range [j-1,j][j-1,j] on the real axis.on the real axis.

The following plot gives outputs for the families of 1023 integration rangesThe following plot gives outputs for the families of 1023 integration ranges

{{j = j = 1, 2, ..., 10231, 2, ..., 1023}}

Gauss-Kronrod 10-21local quadrature ruleGauss-Kronrod 10-21local quadrature rule

Variation of the floating Variation of the floating point degree of precision point degree of precision of the GK 10-21 local of the GK 10-21 local quadrature rule over the quadrature rule over the inflatinflating range ing range [0, [0, jj]] versus its versus its widthwidth j j.. The plot The plot of the computed values of of the computed values of ddfpfp points to a behaviour of points to a behaviour of

ddfpfp which is similar to that which is similar to that

reported in the previous reported in the previous case case ddfpfp = = dd = 31 = 31 at at j j = 1, = 1,

2, 32, 3;; abruptabrupt and then and then milder decreasingmilder decreasing rate rate down to down to ddfpfp = 5 at = 5 at

702 ≤702 ≤ j j ≤ 1023.≤ 1023.

Variation of the floating Variation of the floating point degree of precision point degree of precision of the GK 10-21 local of the GK 10-21 local quadrature rule over the quadrature rule over the inflatinflating range ing range [0, [0, jj]] versus its versus its widthwidth j j.. The plot The plot of the computed values of of the computed values of ddfpfp points to a behaviour of points to a behaviour of

ddfpfp which is similar to that which is similar to that

reported in the previous reported in the previous case case ddfpfp = = dd = 31 = 31 at at j j = 1, = 1,

2, 32, 3;; abruptabrupt and then and then milder decreasingmilder decreasing rate rate down to down to ddfpfp = 5 at = 5 at

702 ≤702 ≤ j j ≤ 1023.≤ 1023.

Features of the Floating Point Degree of PrecisionFeatures of the Floating Point Degree of Precision• Non-equivalence of the siblings in the binary subrange tree. Non-equivalence of the siblings in the binary subrange tree.

Case study of the root domain [0, 2Case study of the root domain [0, 22020] ]

Gauss-Kronrod 10-21local quadrature ruleGauss-Kronrod 10-21local quadrature rule

A binary subrange tree A binary subrange tree iis built up s built up to n-th depth level by bisection ofto n-th depth level by bisection of the parent ranges.the parent ranges. Comparison of Comparison of the dependencies of the floating the dependencies of the floating point degrees ofpoint degrees of precision of the precision of the GKGK 10-2110-21 local quadrature rule local quadrature rule on the depth level in the binary on the depth level in the binary subrange tree generated by the subrange tree generated by the root range root range [0, 2[0, 2nn],], for the for the leftmost leftmost and the rightmost siblings are and the rightmost siblings are plotted for n=plotted for n=2020..While the floating point degree of While the floating point degree of precision of the rightmost siblings precision of the rightmost siblings in the binary subrange tree in the binary subrange tree keeps keeps the minimalthe minimal ddfpfp value of the root value of the root

range [0, 2range [0, 2nn], the values of the ], the values of the floating point degree of precision floating point degree of precision of GK 10-21 for the leftmost of GK 10-21 for the leftmost siblings siblings increases increases from the initial from the initial minimal minimal ddfpfp value up to the value up to the

maximally possible value maximally possible value ddfpfp==dd=31 at the last depth levels.=31 at the last depth levels.

A binary subrange tree A binary subrange tree iis built up s built up to n-th depth level by bisection ofto n-th depth level by bisection of the parent ranges.the parent ranges. Comparison of Comparison of the dependencies of the floating the dependencies of the floating point degrees ofpoint degrees of precision of the precision of the GKGK 10-2110-21 local quadrature rule local quadrature rule on the depth level in the binary on the depth level in the binary subrange tree generated by the subrange tree generated by the root range root range [0, 2[0, 2nn],], for the for the leftmost leftmost and the rightmost siblings are and the rightmost siblings are plotted for n=plotted for n=2020..While the floating point degree of While the floating point degree of precision of the rightmost siblings precision of the rightmost siblings in the binary subrange tree in the binary subrange tree keeps keeps the minimalthe minimal ddfpfp value of the root value of the root

range [0, 2range [0, 2nn], the values of the ], the values of the floating point degree of precision floating point degree of precision of GK 10-21 for the leftmost of GK 10-21 for the leftmost siblings siblings increases increases from the initial from the initial minimal minimal ddfpfp value up to the value up to the

maximally possible value maximally possible value ddfpfp==dd=31 at the last depth levels.=31 at the last depth levels.

OverviewOverview

Bayesian automatic adaptive quadratureBayesian automatic adaptive quadrature Interpolatory quadrature sumsInterpolatory quadrature sums Floating point degree of precisionFloating point degree of precision Features of the floating point degree of precisionFeatures of the floating point degree of precision

ConclusionsConclusions

2323

Allowed range of variation of theIntegrand

Allowed range of variation of theIntegrand

o Definition: Given the subrange [[αα, , ββ], ], its centre γγ = = ((ββ++αα) / 2, ) / 2, the

inherited integrand values ffαα = ff ((αα)) and ffββ = ff ((ββ), ), together with

the newly computed ffγγ = ff ((γγ), ), ifif {{ffαα, , ffγγ, , ffββ}} define a strictly

monotonic sequence, thenthen MM-1-1 < < ((ffγγ - - ffαα) / () / (ffββ - - ffγγ) < M, ) < M, where the

threshold M M follows from the floating point degree of precision ddfp

o Bayesian inference:

proceed to subrange subdivision by bisection.

ConclusionsConclusions The concept of the floating point degree of precision, The concept of the floating point degree of precision, ddfp fp , of an , of an

interpolatory quadrature sum has been defined in an attempt to improve the interpolatory quadrature sum has been defined in an attempt to improve the integrand conditioning diagnostics over subranges in the Bayesian approach integrand conditioning diagnostics over subranges in the Bayesian approach to the automatic adaptive quadrature.to the automatic adaptive quadrature.

The study evidenced the need to consider two parameters for the The study evidenced the need to consider two parameters for the definition of the definition of the ddfp fp , namely,, namely, the maximum absolute magnitude the maximum absolute magnitude X X among among the two ends of the current integration range and the ratio the two ends of the current integration range and the ratio ρρ between the between the range length and range length and XX..

A number of three families of case study integrals was considered: A number of three families of case study integrals was considered: (i) glide integration range [0,1] on the real axis,(i) glide integration range [0,1] on the real axis, (ii) inflating integration range [0, (ii) inflating integration range [0, jj] over the real axis, and] over the real axis, and (iii) the leftmost and rightmost siblings of a binary subrange tree.(iii) the leftmost and rightmost siblings of a binary subrange tree.

Both general arguments and data collected for the three case studies have Both general arguments and data collected for the three case studies have evidenced the occurrence of a significant variation of evidenced the occurrence of a significant variation of ddfpfp from the standard from the standard algebraic degree of precision algebraic degree of precision dd of an interpolatory quadrature sum. of an interpolatory quadrature sum.

The content of information which can be extracted by means of a same The content of information which can be extracted by means of a same local quadrature rule significantly varies with the subrange location inside local quadrature rule significantly varies with the subrange location inside the original integration domain.the original integration domain.

Thank you for your Thank you for your attention !attention !