Post Reply 
(PC-12xx~14xx) qthsh Tanh-Sinh quadrature
04-13-2021, 05:19 PM (This post was last modified: 04-15-2021 05:44 PM by robve.)
Post: #53
RE: (PC-12xx~14xx) qthsh Tanh-Sinh quadrature
I ran 1084 test integrals on the current quad implementation: 818 definite integrals, 208 one-sided inf integrals, and 58 -inf-inf integrals (latest zip file with the results). This shows that:
- reusing previous points is better than zero default function values (58 versus 5) when hitting the endpoints
- default zero function values for inf/nan singularities is better (8 versus 4)

EDIT adding these additional related observations here instead of in a new post:

- A decay factor of .5 or .8 (i.e. fp *= .8 and fm *= .8 when a singularity occurs) produce 8 better and 4 worse qthsh results of the 818 integrals tested. This is the same as using zero by default, which affect the same 8 and 4 integrals. This might just be noise.
- With an initial h=1.5 in qthsh's first iteration instead of 1, 399 integrals are worse, 391 better with respect to the absolute error with the exact integral value.
- With an initial h=0.5 in qthsh's first iteration, 45 are worse, 55 are better with respect to the absolute error with the exact integral value. However, the average number of points to converge went up from 105 to 125.
- Using the pi/2 factor to reintroduce the "pure" Tanh-Sinh rule in qthshs more often produced less accurate results (417) than better results (363) like the WP-34S implementation, taking the same number of points to converge.

The qthsh and quad implementations and the doc will be updated accordingly.

A few more tests are in the pipeline. Almost finished Smile

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (PC-12xx~14xx) qthsh Tanh-Sinh quadrature - robve - 04-13-2021 05:19 PM



User(s) browsing this thread: 2 Guest(s)