Page 3 of 3

Re: DM42 vs DM43S

Posted: Mon Aug 06, 2018 1:56 pm
by pauli
gomefun2 wrote:
Sat Aug 04, 2018 12:05 am
The thing I dislike the most about the wp34s is the lack of a built in MISO solver.
Feel free to donate such a solver to the 34S project. I'm sure a keystroke program would make the standard library. It might make XROM with enough care. A C implementation including the ancillaries, would most likely make it into the main firmware.


Pauli

Re: DM42 vs DM43S

Posted: Mon Aug 06, 2018 8:59 pm
by gomefun2
pauli wrote:
Mon Aug 06, 2018 1:56 pm
gomefun2 wrote:
Sat Aug 04, 2018 12:05 am
The thing I dislike the most about the wp34s is the lack of a built in MISO solver.
Feel free to donate such a solver to the 34S project. I'm sure a keystroke program would make the standard library. It might make XROM with enough care. A C implementation including the ancillaries, would most likely make it into the main firmware.


Pauli
Actually funny you should mention this. I have tried and only marginally succeeded at creating a couple miso solvers. They work but I feel like they could be done better.

Yesterday I was experimenting with building C++ code that used various numerical methods to solve a particular integral. I learned that not all methods are created equal for all equation types and that the number of iterations (speed) can vary considerably from one method to the next.

Since I've already worked on and thought about how to construct MISO solvers for a long while. I could try to take up this challenge.

But I would like to know what are the most efficient numerical methods for this task? I believe that a lot of calculators use something as simple as Newton's method for this.

Also you want the code in C?

I assume that is pretty close to C++ so shouldn't be too much to learn.

Also do you have a textbook or recommended source material that describes how you would like this solver implemented.

I'm sure I could hack something together, but if you have a better starting point than this I could take some advice.

Thanks.

Re: DM42 vs DM43S

Posted: Fri Aug 10, 2018 8:34 am
by pauli
The current solver is a keystroke program fairly close to how the calculator is programmed:

https://sourceforge.net/p/wp34s/code/HE ... olve.wp34s

The main differences in this case are that:
  • the user's function is called using the sequence XEQUSR immediately followed by POPUSR
  • the stack is forced to four levels
  • all registers, flags and user settings have to be preserved
  • the code passed through the C preprocessor
  • the file is run through the assembler which figures out branches etc

Pauli