Post Reply 
(34S) Integration (using the double-exponential method)
03-27-2017, 06:41 AM (This post was last modified: 03-27-2017 07:33 AM by Dieter.)
Post: #14
RE: (WP-34S) Integration (using the double-exponential method)
(03-27-2017 12:10 AM)Paul Dale Wrote:  That's how I thought it worked. Seems I was wrong or something got lost somewhere.

The current integration code can be examined on sourceforge.net. The exit routine at int_done starts with the last two approximations in X and Y, then recalls the two limits and rearranges the stack so that the limits are in Z and T and the last two approximations in X and Y. And indeed there is no final STO–Y that would leave an error estimate in Y.

Edit: The switch from Gauss-Kronrod to Romberg was somewhere between v2240 and v2260. If you compare the integration code of v2240 with that of v2260 you will notice that the former indeed calculated an error estimate from the last two approximations...

Code:
            /* Set up the stack for our output */
            GSB int_restore_limits
            RCL .03
            RCL- .02                /* err, l, u, ?, G*/
            RCL .03                /* K, err, l, u, G*/
            RTN

...while already the earliest Romberg versions didn't:

Code:
/* Three matches in a row is goodness. */
int_really_done::  [cmplx]RCL cr_limits
                   STO L
                   [cmplx]x[<->] Z
                   RTN

...and this obviously has never been corrected. Since the 34s manual says the user interface is "as in the HP-15C" I think this should be done, e.g. like this:

Code:
int_done::  RCL- Y
            RCL L
            [cmplx]RCL cr_limits
            STO L
            [cmplx]x[<->] Z
            RTN

This way (last approx. – prev. approx.) is returned in Y.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (WP-34S) Integration (using the double-exponential method) - Dieter - 03-27-2017 06:41 AM



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