[WP34S] My first integral on this calculator

05182014, 08:25 PM
Post: #1




[WP34S] My first integral on this calculator
Hi all,
I managed to run my first integral on my new WP34S! I must say that, despite using HP RPN calculators since the 70's, I quit using calculators for many years, and only recently started to look again to these devices, by acquiring the 49+, 48GII, 50G and Prime. So I have missed the HP15C and 42S series and I was not aware on how to use integrals in these machines. As the WP34S is loosely based in the HP15C and 42S machines, I had to spend some time digging it until I could use the WP34S as I intended. I was expecting the WP34S to be more closer to the 42S than to the 15C, but it seems that this is not the case. So I took this example where a simple integral is used to compute the "angle of twist" problem from page 125 of the HP42S Programming Examples guide, and have adapted that HP42S program code to run in the WP34S but using the HP15C style (so, no local variables at all). I know this is basic stuff for HP15C / 42S experts, but I believe that probably more people will have the same questions as I had when I tried to take a simple integral in this excellent RPN WP34S (for me it so much easier to do it using "pretty print"/"equation editors"/"templates" as I do on my HPPrime, 50G, and even on a Casio FX991DE Plus...!). To invoke the integral: 1. Create the program and name it 'TOR' 2. Load the lower and upper limits Limits (in this example, Lower (Y):0 Upper (X):2 3. Invoke it from the entry mode: h + 2 ENTER TOR WP34S result: 0.02805957296 (HP42S result as stated in the guide: 0.0281) Time to complete: about 5 seconds My WP34S program code for the "Angle of twist" problem: LBL'TOR' 1 3 * 8 + * 1 5 + * 9 + * 6 + 7 . 9 5 2 1 EEX 8 +/ / 8 3 EEX 9 / RTN END Jose Mesquita RadioMuseum.org member 

05192014, 07:40 AM
Post: #2




RE: [WP34S] My first integral on this calculator
Nice program, just a few comments:
Code: 001 LBL"TOR" Launch :


05192014, 08:20 AM
Post: #3




RE: [WP34S] My first integral on this calculator
Thanks for the corrections and optimizations, Didier!
My intention was to show my (hard) path to discover how to use the integrals in the WP34S, as the existing documentation assumes people knows all this stuff already and so it doesn't include concrete examples of usage for integration, derivatives, matrices, etc. Of course my stupid basic program is not the way to go... setting the variables hardcoded into the program... I did it that way just to test the integration mechanism. When I have time, I will create a new one that will create the UI (user interface) similar to what the HP42S is doing, asking to supply the values for the different variables in the formula. Somehow I was expecting the WP34S to be doing integration using similar UI as seen in the HP42S, but no luck. Jose Mesquita RadioMuseum.org member 

05192014, 08:39 AM
Post: #4




RE: [WP34S] My first integral on this calculator
(05192014 08:20 AM)jebem Wrote: Somehow I was expecting the WP34S to be doing integration using similar UI as seen in the HP42S, but no luck. That exactly is the point. Please read p. 128 (of 244) of the manual  it's clearly stated there for ∫: "Integrates the function given in the routine specified. Lower and upper integration limits must be supplied in Y and X, respectively. ∫ returns the (approximated) integral in X and an upper limit of its uncertainty in Y. Please refer to the HP34C Owner’s Handbook and Programming Guide (Section 9 and Appendix B) or the HP15C Owner’s Handbook (Section 14 and Appendix E) for more information about automatic integration and some caveats." No reference to HP42S. d:) 

05192014, 08:39 AM
Post: #5




RE: [WP34S] My first integral on this calculator  
05192014, 08:41 AM
Post: #6




RE: [WP34S] My first integral on this calculator  
05192014, 08:42 AM
Post: #7




RE: [WP34S] My first integral on this calculator
(05192014 07:40 AM)Didier Lachieze Wrote: you can enter integers up to 255 as constants, this will save a few steps, I'm pretty sure this is faster than using digits. Even for single digit numbers. Once you enter a digit, all the command line processing has to be performed including the text to number conversions. The constant command has a much easier time of it and I think it converts using short integer operations that are very quick. Quote:also to follow the 42s program example you can store the “J” and “G” values in registers (for ex. A & B) instead of hardcoding them in the program, this should save some execution time: Couldn't you store the product of these two in a register and divide by that at the end for a little extra performance?  Pauli 

05192014, 10:23 AM
Post: #8




RE: [WP34S] My first integral on this calculator
To post #7:
Do constants such as # 002 require less memory than 2? 

05192014, 10:26 AM
Post: #9




RE: [WP34S] My first integral on this calculator  
05192014, 02:43 PM
Post: #10




RE: [WP34S] My first integral on this calculator
(05192014 08:41 AM)walter b Wrote:(05192014 08:39 AM)Paul Dale Wrote: The screen isn't up to this Hi Pauli and Walter, I'm not let down by the WP34S project, it was just my lack of proper detailed reading and my excessive hope! You know, I saw the reference to the "HP42S" in one of the guides and have jumped to conclusions... To the contrary, I'm happy with the excellent WP34S performance and huge number of advanced features, specially considering the constrains imposed by the HP30B hardware (memory and display). Thank you so much again for sharing your project! My only real issue here is related to the poor keyboard quality of my HP30B machine, bought used in TAS in Europe for 25 Euros (inc. s&h). One full row refuses to work if I put the screws in the back cover (that was the initial problem, before I have opened it; this is a pcb track broken somewhere...). As if it was not enough, I found out that the up most left key ("A") needs to be pressed beyond reasonable to register itself. I guess I will have to scrap it one of these days and start all over, this time with a new in the box HP30B calculator while they can still be found for sell. Well, at least I do not need to order another keyboard overlay from Eric because initially I ordered two sets just in case... Jose Mesquita RadioMuseum.org member 

« Next Oldest  Next Newest »

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