(28/48/50) Dual Number Functions
|
02-21-2024, 04:34 AM
Post: #5
|
|||
|
|||
RE: (28/48/50) Dual Number Functions
It took me a while to figure out how to transfer these programs to the iHP48 app.
For this I used the programs IN and OUT that I found in BruceH's post: #2 I copied them, double tapped the screen and used: EDIT → Paste into iHP Stack Then I manually replaced the trigrams in the string of IN and used OBJ→ to create the program. This allowed me to use IN to transform OUT. But you can just as well use these two directly. IN: Code: « →STR 3 TRANSIO RCLF SIZE 3 > # 193357d # 196971d IFTE SYSEVAL + STR→ » OUT: Code: « STD 64 STWS →STR 3 TRANSIO RCLF SIZE 3 > # 193359d # 196297d IFTE SYSEVAL » Once transferred I moved all programs into a single directory DUAL and created both a CST menu and key assignments in KEYS: Code: DIR Once the directory object has been copied over and translated by IN just save it in a variable say DUAL. This will create the directory with all the files. The contents of KEYS can then be stored using STOKEYS. Then hit USER twice to activate the assignments permanently. Use CST to activate the customer menu. Examples: Arithmetic \( (3 + 4\varepsilon)(5 + 6\varepsilon) \) 3 4 R→C 5 6 R→C * (15,38) Evaluation of a function and its derivative \( \begin{align} f(x) = \frac{1}{\sqrt{3 + \sin(x)}} \end{align} \) Evaluate \(f(2)\) and \(f'(2)\). 2 1 R→C SIN 3 + √ INV (0.505767179164,2.69195956021E-2) Polynomial Write a program to evaluate the following polynomial: \( f(x) = 2x^3 + 3x^2 + 5x + 7 \) Code: \<< Hint: Please note the use of the ordinary multiplication × with a constant. Finding a root with Newton's algorithm \( \begin{align} x \mapsto x - \frac{f(x)}{f'(x)} \end{align} \) The program is straight forward since both the function and its derivative can be calculated with a single call to f: Code: \<< Now we can use it to find the root of the previous polynomial: -1 NEWTON NEWTON NEWTON … -1.6 -1.4594795539 -1.44565202879 -1.44552846845 -1.44552845868 -1.44552845868 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)