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 11:35 pm
Location: Osnago - Italy

Problem with the solver

Post by Giuseppe Casale »

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: 34
Joined: Sun Jul 09, 2017 1:03 am

Re: Problem with the solver

Post by Logan »

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:00210
DM41X SN:00014
Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 11:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale »

Double and n-checked!
The result is always C=0
Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 11:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale »

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 11:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale »

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: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Problem with the solver

Post by Walter »

There is a step missing containig VARMENU, isn't it?
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 11:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale »

No, VARMENU is not required if you are writing a program for the solver.
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Problem with the solver

Post by Walter »

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.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Giuseppe Casale
Posts: 8
Joined: Mon Mar 04, 2019 11:35 pm
Location: Osnago - Italy

Re: Problem with the solver

Post by Giuseppe Casale »

Walter wrote:
Thu Apr 11, 2019 7: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: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Problem with the solver

Post by Thomas Okken »

Giuseppe Casale wrote:
Thu Apr 11, 2019 6: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 6: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