From: Olive on 13 Jun 2010 00:28 The numerical solver allows to solve equation numerically. Is there a function that provides the same functionality? That I can use in a self defined-function / program? Olive
From: TW on 13 Jun 2010 02:58 On Jun 12, 10:28 pm, Olive <not0read0...(a)yopmail.com> wrote: > The numerical solver allows to solve equation numerically. Is there a > function that provides the same functionality? That I can use in a > self defined-function / program? > > Olive ROOT If I remember correctly, syntax is: equation, start number, variable TW
From: Andreas Möller on 13 Jun 2010 03:01 Hello, > The numerical solver allows to solve equation numerically. > Is there a function that provides the same functionality? > That I can use in a self defined-function / program? For that you must call the internal FLASHPTR directly. An alternative is my GUISLV that provides a USER-RPL command for calling the GUI of the solver. These are the differences to the built-in GUI-Solver: 0. For speed reasons the library should be stored in Port 0. 1. 'EQ' can contain a single equation (Example: 'A+B=C'). If the equation contains built-in constants they will be filtered out. 2. 'EQ' can contain a list which contains the equation (Example: { 'A +B=C' }). If the equation contains built-in constants they will be filtered out. 3. 'EQ' can contain a list which contains the equation and a string that will be used as the title of the input form (Example: { 'A+B=C' "optional title string" }). If the equation contains built-in constants they will be filtered out and the string will be used for the title of the input form. 4. 'EQ' can contain a list which contains the equation and the list of variables that will be shown (Example: { 'A+B=C' { B C } }). The embedded list of the variables will be used for what will be shown by the GUI-Solver. 5. 'EQ' can contain a list which contains the equation and the list of variables that will be shown and a string that will be used as the title of the input form (Example: { 'A+B=C' { B C } "optional title string" }). The embedded list of the variables will be used for what will be shown by the GUI-Solver and the string will be used for the title of the input form. 6. If a list of variables is used to specify the variables no recursive search is done on them. Only the content of each variable is checked and if it is invalid a blank field is displayed. If no list of variables is used to specify the variables than a recursive search will be done on them and if the variable is invalid a blank field is displayed. 7. If a list of variables is used to specify the variables but it is an empty list ( { } ) or contains invalid arguments ( only global names are allowed ) than constants are not filtered out and a recursive search will be done for the variables. 8. If 'EQ' contains something else (or does not exist) the standard behavior of the GUI-Solver is executed. 9. If 'EQ' contains the arguments described above the cursor is placed on the second field so that you are ready to start entering data without moving the cursor 10. Multiple arguments are allowed on the command line, so you can enter more than one value for rapid data input and the fields are filled with the values. Example: Press 1 2 3 [ENTER] to fill the fields with 1 then 2 then 3 (assuming that an equation with three variables is stored in 'EQ'). 11. The softmenu key [PURGE] will delete the variables created by the GUI-Solver and thus allowing a "clean" exit from the GUI-Solver. Additionally all shown variables are reset to zero but attached units are respected. 12. Support for the whole screen of the HP 49G+ / HP 50G. 13. Right arrow executes the selected entry in the reset choose box. 14. If a field contains a unit this is preserved when new data is entered. To get rid of a unit one has to use the "Delete value" function of the reset function. Except when in the Equation Field this function is also mapped to [right shift] [CLEAR]. ToDo: Add checks if this may be supported in a later ROM update. 15. The fields are shown depending on the current font or system flag -73. If user flag 73 is set the space of the help line will be used for the form. 16. If the font is changed while GUISLV is already running (through the [MODE] screen or the [HALT] enviroment, for example) the variables of the current page will not be saved and the form will restart with the first page shown. 17. If the help line is changed while GUISLV is already running the variables of the current page will not be saved and the form will restart with the first page shown. 18. Changes to the variables can not be made inside the solver through the variable input form. If you want to change the variables, you have to do this through the list of the variables submitted with the equation. 19. Everything time critical is done in Saturn ML and the most important routines are stored in the reserved RAM between GROBSCR2 and SystemFont. As a note to Saturn ML programmers this means that you can not use DBUG / DBUG.TOUCHE while GUISLV is running as this overwrites the memory area of GROBSCR5. 20. The overclock feature on a HP 49G+ / HP 50G has been removed as this is already faster than the built-in ROM code. 21. Fixes the display bug if small integers ( -1E12 < ) or large integers ( > 1E12 ) are entered or are the result of a solution. 22. GUISLV should work in Algebraic Mode, however always RPN mode is used while an Editline is active but the field content is displayed in algebraic style. The command line must be handled in RPN because algparse tries to multiply the arguments with each other if there is more than one argument on the command line at command line validation and thus the rapid data entry would not work in Algebraic Mode. 23. The software should be bug free and has been tested (on ROM Version 2.09). However, using this software you agree that you are doing this entirely on your own risk and that I shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this software. The software is provided "as is". I'm making no warranty of any kind with regard to this software, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. (Of course you know the usual disclaimer from the User's manual :-) ToDo: optimize code. ToDo: ensure ROM independency. ToDo: if a variable is used more than once in the list it shows up as often as it is in the list GUISLV can be download freely from my website: http://www.software49g.gmxhome.de/EnglishSeite01.htm#GUISLV HTH, Andreas http://www.software49g.gmxhome.de
From: Olive on 13 Jun 2010 04:13 On Sat, 12 Jun 2010 23:58:20 -0700 (PDT) TW <timwessman(a)gmail.com> wrote: > > ROOT > > If I remember correctly, syntax is: equation, start number, variable > > TW Thanks!
From: John H Meyers on 14 Jun 2010 02:48
Command arguments for ROOT may be found in the Advanced User's Reference (AUR): Level 3: name of a variable containing the program or function, or the actual program or function Level 2: 'variable' (the solver adjusts its value, trying to make the function value zero) Level 1: an initial guess, or a list of up to three initial guesses. The "best guess" value is returned in Level 1 _and_ stored into 'variable' The "best guess" might not actually be a root, but could be a local extremum, if the function did not have opposite signs at any guesses ever tried during the procedure, or could be the location of a discontinuity, etc.: 'X^2+1' 'X' 1 ROOT ==> -2.22879015366E-8 (local minimum at X=0) '1/X' 'X' 1 ROOT ==> 1.45989168193E499 (roots are at +/- infinity) '1/X' 'X' -1 ROOT ==> -1.45989168193E499 '1/X' 'X' { -1 1 } ROOT ==> -1.E-499 (discontinuity at X=0 with infinite function value) The interactive numeric solver displays screen messages for such cases, but ROOT does not (is there any internal function which can analyze the correct case after ROOT has returned a value?) Since the numeric solver "hunts for" and returns only one result, it can not find multiple actual roots during a single invocation, and what it finds may depend on the starting guess(es). A single guess of zero automatically creates a second guess of 1. A single non-zero guess automatically generates a very nearby second guess. [r->] [OFF] |