Collection of functions for DM42/Free42 (updated on 2021-02-23)

Contributions to this software library are always welcome. Please ensure that you post program listings rather than .raw files. They give a reasonable idea of what your program does without having to load them into a DM42 and you can also include comments in your code. Check out the following link for a decoder/encoder: https://technical.swissmicros.com/decoders/dm42/

You can then copy/paste the listing and post it in "code" tags.
ferni123
Posts: 29
Joined: Tue Aug 08, 2017 11:24 am

Re: Collection of functions for DM42/Free42 (updated on 2021-02-03)

Post by ferni123 »

Thomas Okken wrote:
Sun Feb 21, 2021 2:17 am
salvomic wrote:
Sat Feb 20, 2021 11:12 pm
Apparently the program DERIV stops in line 246: XROM 31,40
Using that function in published code is perhaps a bit premature.
Indeed, it is just work in progress. I will add some tags (when I know how to do it) or releases to differentiate which version of the programs work with the released Free42. So, whatever is not tagged, it would mean that is work in progress. In this way, the repo will probably be a bit clearer.

Fernando
User avatar
salvomic
Posts: 152
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Collection of functions for DM42/Free42 (updated on 2021-02-03)

Post by salvomic »

ferni123 wrote:
Mon Feb 22, 2021 9:53 am
Regarding the accuracy, I have used the same definition as here: https://en.wikipedia.org/wiki/Finite_di ... oefficient and it is an integer which relates with the amount of elements used for the the derivative computation. By default, it is set to ORDER + 2. If you modify it, the label of the ACC menu changes and disappear the +2 in the label. Every time that you set an order the accuracy is updated to ORDER+2.

The steps are:

1)Define the function
LBL "FX"
MVAR "X"
1
RCL+ "X"
1/X
END
2) XEQ DERIV
3) Select FX
4) Set "X" to 3
5) Select "X" as variable
6) Define the order to "2" in the menu
7) No need to change the accuracy
8) Press DERIV
Well, doing so I get -1,734.7235. In the old version I get 0.03125 = 1/32.
There is something wrong in the registers, maybe...
ferni123 wrote:
Mon Feb 22, 2021 9:53 am
Thanks for the suggestion on including some examples in Gitlab.com

I also will add some tags (when I know how to do it) to differentiate which version of the file works with the released Free42. So, whatever is not tagged, it would mean that is work in progress.
ok, well. The differentiate program (but also the other in the suite) and your approach to the menu programming are good improvement for Free42/DM42!

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
ferni123
Posts: 29
Joined: Tue Aug 08, 2017 11:24 am

Re: Collection of functions for DM42/Free42 (updated on 2021-02-03)

Post by ferni123 »

Hi Salvo,

I am getting the correct value in my calculator... 0.03125 (check that X, ACC and ORDER have the proper value).

I will spend some time writing a sort of manual and examples.

Cheers,
Fernando
User avatar
salvomic
Posts: 152
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Collection of functions for DM42/Free42 (updated on 2021-02-03)

Post by salvomic »

ferni123 wrote:
Mon Feb 22, 2021 10:24 am
Hi Salvo,

I am getting the correct value in my calculator... 0.03125 (check that X, ACC and ORDER have the proper value).

I will spend some time writing a sort of manual and examples.

Cheers,
Fernando
thanks for your effort, very kind of you.
I'll try other tries to understand where is the error here...

Salvo

EDIT: with accuracy 4 always -1734.7235, I'm using Free42 2.25 downloaded from here: https://thomasokken.com/free42/download/test/
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
ferni123
Posts: 29
Joined: Tue Aug 08, 2017 11:24 am

Re: Collection of functions for DM42/Free42 (updated on 2021-02-03)

Post by ferni123 »

Hi Salvo,

I may suggest you to import directly the ASCII file with the CALC commands into Free42. If it does not work either, notice that the official Free42 that the latest CALC requires has not been released yet.

So, please take the latest version of CALC as work in progress since it does not work with the official release of Free42.

You can adapt the program to work with the official Free42 2.5.25. Remove the command PGMMENU from the ASCII file, import the ASCII file in Free42 and when DERIV program asks you for a function, you can type it by hand in the ALPHA register and press R/S.

Cheers,
Fernando
Last edited by ferni123 on Mon Feb 22, 2021 11:12 am, edited 1 time in total.
User avatar
salvomic
Posts: 152
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Collection of functions for DM42/Free42 (updated on 2021-02-03)

Post by salvomic »

thank again for your patience and kindness, I'll do so.
Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
ferni123
Posts: 29
Joined: Tue Aug 08, 2017 11:24 am

Re: Collection of functions for DM42/Free42 (updated on 2021-02-22)

Post by ferni123 »

Hi Salvo,

I have just created a tag for the programs in Gitlab with a version compatible for Free42 2.5.24 (or above):

https://gitlab.com/fmartinp/programs42/-/tree/1.0.0

I have just decided to remove the raw files since anyone can generate them from the text files.

On the other hand, have you succeeded running the DERIV program? I believe that maybe you forgot to set the ORDER of the derivative.

Regards,
Fernando

As example, I will reproduce here the operations to run it.

1) Create the FX
LBL "FX"
MVAR "X"
1
RCL+ "X"
1/x
END

2) Run XEQ "DERIV"

3) When the program stops with the message "Select f(x) Program", type "FX" in the Alpha register

4) Press R/S

5) When the program stops with the message "Set Vars; Select Var", type the evaluation point (for instance 1) and the press in the soft menu X. Press again on X

6) In the DERIV menu:

7) type the derivative order that you would like to compute (for instance, 3 for third derivative) and press ORDER in the soft menu.

8) then press DERIV. The other options is to change the order of accuracy (which is automatically set to ORDER+2, when the ORDER is introduced.

That should be enough to get the result. I hope that this information helps you.
Last edited by ferni123 on Mon Feb 22, 2021 10:22 pm, edited 2 times in total.
User avatar
salvomic
Posts: 152
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Collection of functions for DM42/Free42 (updated on 2021-02-22)

Post by salvomic »

hi Fernando,
very clear explanation, thanks.
I'll try later, after having created the raw with the tool...

Salvo

EDIT: the Tool (https://technical.swissmicros.com/decod ... /index.php) doesn't know "FUNC 01" and not convert in .raw with such instructions.
It should be emended.

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
ferni123
Posts: 29
Joined: Tue Aug 08, 2017 11:24 am

Re: Collection of functions for DM42/Free42 (updated on 2021-02-22)

Post by ferni123 »

You can use the Free42 2.5.25 in the computer. Enter in PRGM mode and copy the text using CTRl+C/CTRL+V.
User avatar
salvomic
Posts: 152
Joined: Sat Dec 30, 2017 10:09 am
Location: Ragusa, Sicily
Contact:

Re: Collection of functions for DM42/Free42 (updated on 2021-02-22)

Post by salvomic »

ferni123 wrote:
Mon Feb 22, 2021 10:17 pm
You can use the Free42 2.5.25 in the computer. Enter in PRGM mode and copy the text using CTRl+C/CTRL+V.
maybe first removing all the comments :-)
I tried first with "Import" from menu (of the App) and I got various "END" label in XEQ...

ok, I'm trying so

Salvo
∫aL√0mic (IT9CLU) :: DM42 (SN: 00881), DM41X (SN 00523), DM16, HP Prime, 50g, 41CX, 42s, 71b, 15C, 12C, 35s, WP34s -- Free42
Post Reply