(PC-12xx~14xx) qasi Adaptive Simpson quadrature
|
04-16-2022, 04:09 PM
(This post was last modified: 04-16-2022 04:39 PM by Albert Chan.)
Post: #4
|
|||
|
|||
RE: (PC-12xx~14xx) qasi Adaptive Simpson quadrature
(04-16-2022 01:45 PM)robve Wrote: A bit surprised to see that the recursive version on the HP 71B takes much longer, If we replace stack version FNF(x) as subroutine, 11s goes up to 14s. About half of the slowdown is because of the more efficient FNF(x). SUB SIMPSON() does not see FNF(x), thus required slower SUB F(x,y) The other half is due to different recurse conditions. (see below) Quote:The quadrature should be comparable, but not necessarily identical as the summation order differs Also, recurse condition of two versions are close, but not identical. Stack version recurse if E = [1E-15, ABS((S-U)/15)] SUB SIMPSON recurse if E = [1E-15/16, ABS((S-U)/16)] For our test example, with undefined value at x=0, SIMPSON version recurse deeper. With SIMPSON version matching stack version E recurse condition, it produce similar result. > RUN .73902420507 15.44 Compare apples to apples, both using SUB F(x,y), timing difference is now minor. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(PC-12xx~14xx) qasi Adaptive Simpson quadrature - robve - 03-28-2021, 01:40 PM
RE: (PC-12xx~14xx) qasi Adaptive Simpson quadrature - Albert Chan - 04-15-2022, 01:45 AM
RE: (PC-12xx~14xx) qasi Adaptive Simpson quadrature - robve - 04-16-2022, 01:45 PM
RE: (PC-12xx~14xx) qasi Adaptive Simpson quadrature - Albert Chan - 04-16-2022 04:09 PM
|
User(s) browsing this thread: 1 Guest(s)