(11C) CUBIC EQUATION
|
06-11-2018, 02:16 AM
(This post was last modified: 06-11-2018 07:50 AM by Gamo.)
Post: #16
|
|||
|
|||
RE: (11C) CUBIC EQUATION
Dieter
Thank You for reviewing this program I noticed that this routine take a long time to run and must be something wrong in the original coding. I try this on HP-15C App on Android and it run extremely fast with correct answer using the original code. Here is the original program: CUBIC EQUATION It does so by extracting the first root, performing synthetic division, and solving the resulting quadratic equation (ref: HP-19C/HP-29C Application Book, p.6) USER INSTRUCTIONS: 1. Initialize f [REG] 2. 10^-4 [STO] 0 3. STORE Coefficients: a [STO 1] b [STO 2] c [STO 3] 4. RUN: [GSB] 1 // 1st root // [R/S] D 5a. If D greater than or equal to zero // [R/S] 2nd root [R/S] 3nd root 5b. If D less than zero // [GSB] 2 (v) [X<>Y] (u) Program: CUBIC EQUATION Code:
Remark: Under user instruction the first step said Initialize f [REG] is this to make sure that each RUN register R4 is clear and that start R4 with zero ? Gamo |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)