Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!e2big.mko.dec.com!nntpd.lkg.dec.com!jareth.enet.dec.com!edp From: edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) Newsgroups: comp.sys.handhelds Subject: Re: Numerical Integration on the HP48 Message-ID: <23222@shlump.lkg.dec.com> Date: 6 Jun 91 14:37:01 GMT References: <1991Jun5.192839.4847@ll.mit.edu> Sender: newsdaemon@shlump.lkg.dec.com Reply-To: edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) Organization: Digital Equipment Corporation Lines: 29 In article <1991Jun5.192839.4847@ll.mit.edu>, wjc@llex.ll.mit.edu ( Bill Chiarchiaro) writes: >I have a version E HP48SX and have been trying to get it to >numerically integrate a program object (rather than an algebraic). >If I put limits of integration in stack levels 3 and 4, a program >object in level 2, and a quoted name in level 1, I get a "Bad Argument >Type" error when I hit the integral key. Put the following on the stack: lower upper 'expression' variable In the expression, calls to programs should appear in the form: name(arguments) The program should have the form: << -> local variable names << program code >> >> I tried this with: 2 3 'S(X)' 'X' while S contained \<< \-> X \<< X SQ \>> \>>, and it worked. giving the correct result (6.333...). -- edp (Eric Postpischil) "Always mount a scratch monkey." edp@jareth.enet.dec.com