Numerical Integration using a modified Romberg method. This routine uses a function macro entered by the user to do either a numerical integration or a summation. This is best illustrated with an example. To integrate x^(-x) from 0 to 1, do the following: 1. Put a dummy number on the stack, then enter macro mode. 2. Do: ENTER, +/-, y^x 3. Exit macro record mode. 4. Enter onto the stack, 0 1 5. Press the UpperLimit button, then the LowerLimit button 6. Press the Integr button, and choose the standard option. 7. After informing you of a singularity, the stack contains: 10, 6e-7, 1.291285777... indicating, 10 iterations, estimated error of 6e-7, and the answer. RPN.3.z\Integrate_Sum {o}CwXr#'20'Xc; [0]r2Cw5P+g1CwCb/*r3*+; [1]d12Xk2xv2-P1-V0{v1H+xs*xu+1C0Up+_v}; [2]D' Integrable singularity\ a limit point.|\OK|'d1; [3]D' Integrable singularity\ at interior point.|\OK|'d1; [b]#'100'; [w]#'1.0E-8';\Default tolerance. Abs(Log)+2 is iteration limit [x]g11*Cw*b#'1.0E60000'>; [W]0Xy0XkxuUpCx(d11Xkxu1C0Up)xtUpCx(d11Xkxt1nC0Up)+Hxtxu-g1Xs*g12Xv { 2xv2-P1-V0{v1H+xs*xu+Up+_v}Cx(C1) xs*g2+Hg1xv2+k@2Xx {4xx1-P*r2-4xx1-P1-/g1xv2+k@xx1+g1Xxxv>(B)} Vvxv2+k@xsHXsxv3> (xv1+g@-v/bg1xr|:0)(XsB:d1xv1+Xv) }xvXx{d1_xx} xvxsv*bxv8<(91+xv8-P*)g1Lwb1+r2g291+r2P*w91+r3P/v1XyC^xkc(:C2:C3); [X]D' Choose iteration limit\ (eval. time increase)|10(std)|12(x4)|14(x16)|\last|' 91+r2c(8nPXr:91+nPXr:93+nPXr:d1)CW; [Y]0XyxuV0{vUp+vxt1->(B)v1+Vvxc%(:Ud)}v1+Upr21XyC^; [^]#'1000'#'51'S; "Integrate_Sum" "UpperLimit:v1.2"Xt; ~ "LowerLimit"Xu; ~ "Integr.: x: Integral\ y: est. error\ z: # iterations"CX; "Sum: x: Summation\ y:next term"CY;