commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <>
Subject Re: [math] On MATH-995: Problems with LegendreGaussQuadrature class.
Date Fri, 28 Jun 2013 16:05:17 GMT
On Fri, 28 Jun 2013 08:32:49 -0700, Ted Dunning wrote:
> On Fri, Jun 28, 2013 at 8:14 AM, Gilles 
> <>wrote:
>> Hello.
>>  The existing LegendreGaussQuadrature class incorrectly assumes that 
>> it has
>>> converged for functions where the polynomial approximation fails in 
>>> a
>>> small
>>> corner of the integral space.
>>> This situation is handled much better with the AdaptiveQuadrature 
>>> class in
>>> the path for MATH-995. This problem should be observable with any
>>> integral,
>>> but I observed it with an improper integral. The patch in MATH-995
>>> transforms the improper integral to a proper one before applying 
>>> the
>>> LegendreGaussQuadrature class (to show how it fails). It also 
>>> computes the
>>> same proper integral with the Adaptive method to show the proper 
>>> behavior.
>> Please note that CM aims at providing _standard_ algorithms.[1]
>> Wikipedia has this general article:
>> where it is mentioned that the problem is broken into
>> * standard quadrature rules,
>> * logic to subdivide the interval and terminate the algorithm.
>> As I explained in the other post we must aim at flexibility. In this
>> case, that would indeed imply a clean separation, as outlined in the
>> article referred to above. [This is obviously not the case in your
>> "AdaptiveQuadrature" class.]
> Gilles,
> This guy is reporting a problem with LGQ and you seem to jump on him 
> for
> coding style.
> Isn't the correct response more along the lines of "Hmm.... 
> interesting
> discrepancy.  Need to check on it"?

Did you read my comment in

Also, there the submitted code was referred to as a "solution" (which I 
interpreted as "apply this fix"). I just point out here that it cannot 
be a fix.

I'm afraid I missed the actual display of the "interesting 
discrepancy". Could
you point me to it?

Did you read my other (rather more lengthy) post?  Is that "jumping"?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message