Post Reply 
(11C) CUBIC EQUATION
06-10-2018, 03:34 PM (This post was last modified: 06-10-2018 06:51 PM by Dieter.)
Post: #12
RE: (11C) CUBIC EQUATION
(06-10-2018 02:36 PM)Gamo Wrote:  Somehow the program I listed seem to work.

Did you really re-enter it completely from the listing in your first post?
Look at this:

Code:
LBL 1
RCL 7
RCL 6
x
RCL 4    <=== here R4 is added although nothing has been stored there before!
+
STO 5
RCL 4   <=== here R4 is recalled once again although nothing has been stored there before
X=Y
GTO 3

(06-10-2018 02:36 PM)Gamo Wrote:  Under X<0 there is one STO 4 which follow by another conditional then branch to LBL 1

There is only one X<0? test in the whole program. (BTW I could hardly find it because instead of the "<" there is some other strange symbol).

Look at the point with the X<0? test that you mentioned. This is the only place where X<0? appears in the program:

Code:
RCL 5
STO 4
RCL 8
RCL 6
x
X<0?    <=== now with a correct "<" sign
GTO 1
GTO 2
LBL 3
...

Here you said:
(06-10-2018 02:36 PM)Gamo Wrote:  Under X<0 there is one STO 4 which follow by another conditional then branch to LBL 1

As you can see there is no STO 4 below the X<0? test. And there also is no other conditional test following these steps.

EDIT: I see you have changed your post.
Now it says: "Under X>Y there is one STO 4 follow by X<0 then branch to LBL 1"

There is only one x>y? test, so you seem to refer to this part of the code:

Code:
ABS 
RCL 0
X>Y
GTO 3
RCL 5
STO 4
RCL 8
RCL 6
x
X<0
GTO 1

Yes. there is a STO 4. But this is AFTER R4 has been recalled two times before – without anything having been stored there previously ! R4 is already recalled before this, four and seven steps after LBL 1. But at this point nothing has been stored there before.

(06-10-2018 02:36 PM)Gamo Wrote:  For now I provide the clips to show that this program work.
Two cubic equations shown in the description.

It may well be that the program in your calculator is working. But that does not say anyting about the listing in the first post.

Once again: Please, Gamo, check the listing carefully. It does not work the way you posted it.

By the way: what does the program return for x³ – x² – x ?
According to the listing this should throw an Error. This could be avoided with a slight change.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) CUBIC EQUATION - Gamo - 06-09-2018, 11:49 AM
RE: (11C) CUBIC EQUATION - Gamo - 06-09-2018, 12:34 PM
RE: (11C) CUBIC EQUATION - Dieter - 06-09-2018, 12:54 PM
RE: (11C) CUBIC EQUATION - rprosperi - 06-09-2018, 01:00 PM
RE: (11C) CUBIC EQUATION - Dieter - 06-09-2018, 06:05 PM
RE: (11C) CUBIC EQUATION - Dieter - 06-09-2018, 07:50 PM
RE: (11C) CUBIC EQUATION - Dieter - 06-10-2018, 07:15 AM
RE: (11C) CUBIC EQUATION - Dieter - 06-10-2018, 09:17 PM
RE: (11C) CUBIC EQUATION - Albert Chan - 07-20-2021, 10:12 PM
RE: (11C) CUBIC EQUATION - Gamo - 06-10-2018, 02:42 AM
RE: (11C) CUBIC EQUATION - Gamo - 06-10-2018, 02:36 PM
RE: (11C) CUBIC EQUATION - Dieter - 06-10-2018 03:34 PM
RE: (11C) CUBIC EQUATION - Dieter - 06-10-2018, 09:35 PM
RE: (11C) CUBIC EQUATION - Gamo - 06-11-2018, 02:16 AM
RE: (11C) CUBIC EQUATION - Dieter - 06-11-2018, 07:04 AM
RE: (11C) CUBIC EQUATION - Gamo - 06-11-2018, 08:19 AM
RE: (11C) CUBIC EQUATION - Dieter - 06-11-2018, 08:19 PM
RE: (11C) CUBIC EQUATION - Gamo - 06-12-2018, 07:02 AM



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