WP34s Integration and flashing RCL - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not quite HP Calculators - but related (/forum-8.html) +--- Thread: WP34s Integration and flashing RCL (/thread-4785.html) WP34s Integration and flashing RCL - Lode - 09-23-2015 11:40 PM Hello, When integrating the function 1/ln(x), that is, ln followed by 1/x, from 2 to 5, it outputs 2.58942452991 while RCL (running program) is blinking. That number happens to be correct, but I guess it didn't realize it yet itself But RCL keeps blinking. So in an attempt to stop it from blinking, I press exit. But then, it stops with some random value, e.g. 0.67... The beginners manual doesn't have a section about integration. And the 3.1 PDF manual has only one thing to say about integration: refer to the HP15C manual. The HP15C stops quickly with this integral though, the situation is not applicable. Does anyone know what's happening here, and how to use its correct result? Thanks RE: WP34s Integration and flashing RCL - SecondCalc - 09-24-2015 12:08 AM Trying this on my WP 34S, the RCL annunciator stops flashing after approximately one minute. RE: WP34s Integration and flashing RCL - Paul Dale - 09-24-2015 03:10 AM The 34S is showing its best estimate for the integral as it goes. It is doing an extra iteration to see if this estimate changes or not which gives the flashing RCL. When you interrupt it, you stop the integration process and you'll get whatever is in the stack at the time. - Pauli RE: WP34s Integration and flashing RCL - Dieter - 09-26-2015 09:41 PM (09-23-2015 11:40 PM)Lode Wrote:  When integrating the function 1/ln(x), that is, ln followed by 1/x, from 2 to 5, it outputs 2.58942452991 while RCL (running program) is blinking. That number happens to be correct, but I guess it didn't realize it yet itself Your 34s realizes that 2.58942452991 is almost correct, so it adds one or two more iterations. (09-23-2015 11:40 PM)Lode Wrote:  Does anyone know what's happening here, and how to use its correct result? "Integrate" determines the integral in an iterative way. The current approximation after every iteration step is displayed, so you can see the result converge. In ALL mode, this is what you'll see: Code: ```∫ ≈ 2.58808349458 ∫ ≈ 2.59110867475 ∫ ≈ 2.58939075912 ∫ ≈ 2.58942437481 ∫ ≈ 2.58942453193 ∫ ≈ 2.58942452991 ∫ ≈ 2.58942452992 ∫ ≈ 2.58942452992  <= final result (actually 2.589424529915154)``` At the beginning the displayed intermediate results will change quickly, but since the number of subintervals doubles (!) with every iteration step, the display is updated more and more slowly. The iteration will stop as soon as the new approximation agrees with the previous one when rounded to display precision. Take a look at the values above: The next value after 2.58942452991 is 2.58942452992, so the iteration has not converged yet. The next iteration will require twice the time of the previous one, so be patient – the last step may take 15...20 seconds – and finally see 2.58942452992 again. Now the iteration terminates and RCL stops flashing. All this will take some time since you told the 34s you want 12 correct digits, like they are displayed in ALL mode. Set it to FIX 4 and the iteration will stop after three seconds with the result ∫≈2.5894. At this point the last, fourth approximation agrees with the third one as they both round to 2.5894. Or if eight decimals are fine for you, simply set FIX 8 and get 2.58942453 in merely 10 seconds. Or set SCI 5 to get a result with six valid significant digits (2.58942 E+00). Yes, the exit condition could be somewhat less strict, e.g. "exit as soon as the last two results do not differ by more than 1 or 2 ULP", but the 34s plays safe here and it prefers a correct result over a fast one. In fact the final result here has 15 correct digits. Or even 19 digits in double precision mode. In this case, of course, you can be quite sure to see the correct result as soon as 2.58942452992 is displayed – here only the last digit changed by one unit. Just wait a few seconds to have it confirmed by the 34s after one more iteration. Pauli: what about displaying the final result with "∫ =" instead of "∫ ≈" ? This way the user would not have to observe that small flashing RCL annunciator. Do you think this would be a good idea? Yes, of course I know that even the final result is just an approximation. ;-) Dieter RE: WP34s Integration and flashing RCL - Paul Dale - 09-26-2015 11:45 PM (09-26-2015 09:41 PM)Dieter Wrote:  Pauli: what about displaying the final result with "∫ =" instead of "∫ ≈" ? This way the user would not have to observe that small flashing RCL annunciator. Do you think this would be a good idea? Yes, of course I know that even the final result is just an approximation. ;-) It would be possible, but this doesn't seem easily distinguishable to me. Pauli RE: WP34s Integration and flashing RCL - emece67 - 09-27-2015 09:50 AM Does the wp34s use the same Romberg's method as the 15C? Even with the "warping" of the integration interval in order to enhance precision with periodic integrands? Regards. RE: WP34s Integration and flashing RCL - Dieter - 09-27-2015 11:59 AM (09-27-2015 09:50 AM)emece67 Wrote:  Does the wp34s use the same Romberg's method as the 15C? Even with the "warping" of the integration interval in order to enhance precision with periodic integrands? The 34s uses the classic Romberg method, while the 34C and 15C apply a few tweaks (e.g. irregularly spaced nodes) to prevent certain problems. You can inspect the code on sourgeforge.net and see what it does. It's an XROM routine, so it looks like a regular 34s user program. Dieter