The following warnings occurred:
Warning [2] Undefined array key 37778 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37783 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37782 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37784 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37785 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37798 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37847 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37849 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37851 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37785 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 37851 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.15 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





Intergation algorithm



#10

Hi, all

Several years ago I managed to get a copy of an article that described the algorithm used by HP calculators to do numerical integration. I seem to have lost the article.

Does anyone have an explanation of the algorithm?

Thanks

- rick


#11

Googling with the title of the article, "Handheld Calculator Evaluates Integrals", reveals a link at one of the original author's Pages (http://www.cs.berkeley.edu/~wkahan/Math128/), namely

http://www.cs.berkeley.edu/~wkahan/Math128/INTGTkey.pdf

Hope that helps,
Ralf.


#12

Funny - Google won't find it for me. Thanks for the pointer!

#13

The article of which you speak is very likely this one written by William H. Kahan, the numerical analyst who consulted with HP on many of their calculator algorithms.


#14

Thank-you - that's the one!


#15

As a calculator fan(atic) and ex-mathematician, I would be interested to know what you had in mind for the algorithm? Do you plan on re-implementing it somewhere, or is it just curiousity?

Personally, I would like to get a flowchart or pseudocode for the solve algorithm. I've read Kahan's article on the matter (you can find it in the same place as the integration article) but there is still lots of holes to be filled in.


#16

hi there,

recently ive been reviewing a bunch of quadrature algorithms. tooling up for version3 of my palm calculator. my search is along the lines of; what is the best numerical quadrature algorithm given a pocket device with a bit more poke than a normal calculator (poke=50-500Mhz).

candidates: simpsons rule, newton-cotes etc., romberg (open and closed), gauss and spectral techniques like clenshaw-curtis and other FFT accelerated forms.

BTW, does anyone have any code or doc for gauss-kronrod? i know what it is but i dont have enough details to write it (gauss-kronrod is adaptive gauss apparently now used by casio).

my test suite (so far)is: sqrt(x), cos(log(x)), exp(-x)/x, sqrt(fabs(x-1)), exp(-x*x), cos(1/x), sin
(x)/x.

the most promising so far is a modified romberg in the way suggested by kahan. i've come up with something that i think might well be very similar to the method used on the 15c. ok, you wont get the same answers, but algorithmically.

as a taunt i implemented it on the 9g, like this:

INPUT A,B,E
H=2;D=0;M=0;J=1;B=B-A
FOR (K=0;K<9;++K) {
L=D;F=H/2-1;C=0
FOR (I=0;I<J;++I) {
D=1-FF;X=((F+DF/2)*B+B)/2+A
GOSUB PROG 9;C=C+DY;F=F+H;}
F=4;D=M;M=(M+HC)/2
FOR (I=0;I<=K;++I) { C=N[I];N[I]=(F*M[I]-D)/(F-1);D=C;F=4F }
D=M[I]
IF (ABS(D-L) < 16E*ABS(D)) THEN { GOTO 1; }
J=2J;H=H/2 }
Lbl 1:
S=3DB/4;PRINT S
END

if you find this too worrying you can read it clearer here,
http://www.voidware.com/rombint.htm


#17

For some unknown reason, I have always liked Gaussian Quadrature... a hangover from my IBM 1130 days...


#18

i did some work on the basic gauss-legendre so that the method calculated the weights and sample points as it went along. thus avoiding storage.

the idea was to see if this would work on real calculators. the trouble was that you have to loop over `n' samples for each coefficient, so you got n^2/2 performance. it flew on a pc, but as you can imagine, after only small n, poor old calculator was too slow.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Question about a "combinations" algorithm Namir 9 2,461 09-20-2012, 04:51 PM
Last Post: Gilles Carpentier
  Linear Programming - Simplex Algorithm LarryLion 5 1,612 09-04-2012, 10:57 PM
Last Post: David Hayden
  Algorithm for fitting a logistic curve? Tim Wessman 5 1,719 11-13-2011, 01:22 AM
Last Post: Wes Loewer
  A fast and compact algorithm for the normal quantile Dieter 13 3,305 04-22-2011, 07:11 PM
Last Post: Paul Dale
  The forensics algorithm for the 10s Palmer O. Hanson, Jr. 4 1,413 01-19-2010, 11:25 PM
Last Post: Katie Wasserman
  An old logrithm algorithm Palmer O. Hanson, Jr. 8 2,083 12-26-2008, 10:47 PM
Last Post: PatrickS
  Calculator Algorithm or Canon F-766S vs TI-89 Joerg Woerner 7 1,976 06-04-2008, 10:54 AM
Last Post: Gunnar Degnbol
  CORDIC Trigonometric Algorithm on an HP17BII Charles 4 1,481 03-14-2008, 12:14 AM
Last Post: Eric Smith
  HP-16C Encryption Algorithm John Williamson 3 1,273 01-19-2006, 05:45 AM
Last Post: John Williamson
  New root-seeking algorithm Namir 7 2,185 12-10-2005, 10:39 PM
Last Post: Namir

Forum Jump: