Bill Allombert on Tue, 18 Jun 2002 16:26:24 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: intnum |
On Mon, Jun 17, 2002 at 07:31:31PM +0200, Karim BELABAS wrote: > Received the following bug report: > > (19:10) gp > intnum(x=0,Pi,sin(16*x)^2) > %1 = 1.855125350366532182 E-54 \\ should be Pi/2 > > Cause: integral computed using Romberg method, with equally spaced points > (+ interpolation of successive values for a few runs with increasing number > of points). For highly oscillating functions (esp. integrating over 2^k * > period), we may be unlucky. > > Possible solution: pick random point in each subinterval ? ? intnum(x=0,Pi,sin(16*x)^2,3) %1 = 1.570796326794896619231321691 So what trick does this flag use ? Cheer, Bill.