Problem with the solver

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 10:35 pm
Location: Osnago - Italy

Problem with the solver

Post by Giuseppe Casale » Thu Apr 11, 2019 2:03 pm

I'm trying to use the DM42 solver but I always have the same problem.
Even with this simple equation taken from the manual, after inserting A and B, pressing 'C' I always get 0, it works correctly on Free42 but not on DM42.
What am I doing wrong?

Code: Select all

01 LBL "SIMPLE"
02 MVAR "A"
03 MVAR "B"
04 MVAR "C"
05 RCL "A"
06 RCL+ "B"
07 RCL- "C"
08 END

Logan
Posts: 25
Joined: Sat Jul 08, 2017 11:03 pm

Re: Problem with the solver

Post by Logan » Thu Apr 11, 2019 2:31 pm

You've probably double-checked already, but is everything entered correctly? I entered what you had into the DM42 with 15 for A and 5 for B and pressing C resulted in 20 as expected.
DM42 SN 210

Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 10:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale » Thu Apr 11, 2019 2:49 pm

Double and n-checked!
The result is always C=0

Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 10:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale » Thu Apr 11, 2019 3:13 pm

Nothing to do, I've tried again and again but always C = 0!
Maybe I'm doing something wrong, but I don't understand where.

Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 10:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale » Thu Apr 11, 2019 4:06 pm

Well, I loaded some old programs and they also did not work properly.
I don't know what happened so I made a reset and now those programs and the solver works correctly.
I really would like to understand what happened; maybe I made some incorrect operation, but what?

User avatar
Walter
Posts: 973
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: Problem with the solver

Post by Walter » Thu Apr 11, 2019 4:07 pm

There is a step missing containig VARMENU, isn't it?
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 10:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale » Thu Apr 11, 2019 4:25 pm

No, VARMENU is not required if you are writing a program for the solver.

User avatar
Walter
Posts: 973
Joined: Tue May 02, 2017 9:13 am
Location: Close to FRA, Germany

Re: Problem with the solver

Post by Walter » Thu Apr 11, 2019 5:38 pm

On my DM42, it works as it should: [f] [SOLVER] SIMPL displays a menu with A, B, C; e.g. 4 [A] 7 [ B ] [C] returns 11.
DM42 SN: 00041 --- Follower of Platon.

HP-35, HP-45, ..., HP-50, WP 34S, WP 31S, DM16L

Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 10:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale » Thu Apr 11, 2019 6:05 pm

Walter wrote:
Thu Apr 11, 2019 5:38 pm
On my DM42, it works as it should: [f] [SOLVER] SIMPL displays a menu with A, B, C; e.g. 4 [A] 7 [ B ] [C] returns 11.
Mine too, after the Reset.

Thomas Okken
Posts: 576
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: Problem with the solver

Post by Thomas Okken » Thu Apr 11, 2019 7:04 pm

Giuseppe Casale wrote:
Thu Apr 11, 2019 4:06 pm
Well, I loaded some old programs and they also did not work properly.
Were those old programs functions for use with SOLVE as well, or did you have trouble running programs in general?
If they were SOLVE programs, were you solving for the same parameter each time?
Giuseppe Casale wrote:
Thu Apr 11, 2019 4:06 pm
I don't know what happened so I made a reset and now those programs and the solver works correctly.
I really would like to understand what happened; maybe I made some incorrect operation, but what?
The failure mode sounds unfamiliar, but the one thing I could imagine happening is pathological guesses, left behind from a previous SOLVE execution, causing the solver to give up immediately. You can make sure that isn't happening by providing two starting guesses; in your example, you could have tried 0 [C] 0 [C] [C]. (The two starting guesses do not have to be different.)

Post Reply