[MIN],[MAX] and [FIND]...how to?
[MIN],[MAX] and [FIND]...how to?
Hi,
The Free42 calculator of Thomas Okken even includes functions, which HP does not made public...
The new Free42 version 2.50.20, which was released recently, made those easy accesible via the function
catalog now...they were "hidden" previously.
I tried those on my DM42 and did not get any results...I am unsure, whether they were included (but "hidden")
or not at all in the current firmware build or whether I am the reason for it.
For the [FIND] function I did this:
Create a named matrix (2x2) and fill them with 11,13,17,19
RCL it on the stack (x).
17 ENTER (x, matrix is on y now)
XEQ "[FIND]"
Response: "Not existent".
The link to Joseph K. Horns findings regarding these function is dead in the Free42 pdf but can be found here:
https://archived.hpcalc.org/hp42s/docs/ ... tions.html
...but I obviously didn't understand those correctly.
Background: Until a new firmware for the DM42 is released, which may include the newest Free42 code I want to place
those three functions into the CUSTOM menu...
Any help how to use these functions is very appreciated...thank you
Cheers
mcc
The Free42 calculator of Thomas Okken even includes functions, which HP does not made public...
The new Free42 version 2.50.20, which was released recently, made those easy accesible via the function
catalog now...they were "hidden" previously.
I tried those on my DM42 and did not get any results...I am unsure, whether they were included (but "hidden")
or not at all in the current firmware build or whether I am the reason for it.
For the [FIND] function I did this:
Create a named matrix (2x2) and fill them with 11,13,17,19
RCL it on the stack (x).
17 ENTER (x, matrix is on y now)
XEQ "[FIND]"
Response: "Not existent".
The link to Joseph K. Horns findings regarding these function is dead in the Free42 pdf but can be found here:
https://archived.hpcalc.org/hp42s/docs/ ... tions.html
...but I obviously didn't understand those correctly.
Background: Until a new firmware for the DM42 is released, which may include the newest Free42 code I want to place
those three functions into the CUSTOM menu...
Any help how to use these functions is very appreciated...thank you
Cheers
mcc
DM 42  SN: 00373, Firmware release v.:3.16. / DMCP 3.20. as compiled by SwissMicros
Re: [MIN],[MAX] and [FIND]...how to?
I don't quite understand what more help you need apart from Joe's very extensive documentation of these functions?
Werner
Werner
42S #3249S01123
DM42 #00345
DM42 #00345
Re: [MIN],[MAX] and [FIND]...how to?
The functions are documented at https://www.hpmuseum.org/forum/thread8887.html. I believe you need to INDEX the matrix (under the MATRIX menu) before you execute [FIND].
Edit: I just tested this in Free42 Windows. The [FIND] function doesn't seem to work with a matrix that's only on the stack; you need to first STO the matrix and then INDEX it as documented by Joe Horn. The matrix that's been most recently indexed is the one that [FIND] will try to search in.
Edit: I just tested this in Free42 Windows. The [FIND] function doesn't seem to work with a matrix that's only on the stack; you need to first STO the matrix and then INDEX it as documented by Joe Horn. The matrix that's been most recently indexed is the one that [FIND] will try to search in.
Last edited by firai on Mon Sep 28, 2020 11:32 am, edited 2 times in total.
Sam

 Posts: 758
 Joined: Tue May 02, 2017 5:48 pm
 Location: United States
 Contact:
Re: [MIN],[MAX] and [FIND]...how to?
No it isn't
17 is in X and Y and the matrix is in Z.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Re: [MIN],[MAX] and [FIND]...how to?
Hi,
Thanks for the help! It works now. I missed the INDEX and ENTER was supferfluos.
Cheers!
mcc
PS: Thanks for the link to that thread!
Thanks for the help! It works now. I missed the INDEX and ENTER was supferfluos.
Cheers!
mcc
PS: Thanks for the link to that thread!
DM 42  SN: 00373, Firmware release v.:3.16. / DMCP 3.20. as compiled by SwissMicros
Re: [MIN],[MAX] and [FIND]...how to?
You can EDIT the matrix in the stack, and then [FIND] etc will work. Remember to exit the editor with EXITALL though.firai wrote: ↑Mon Sep 28, 2020 7:52 amEdit: I just tested this in Free42 Windows. The [FIND] function doesn't seem to work with a matrix that's only on the stack; you need to first STO the matrix and then INDEX it as documented by Joe Horn. The matrix that's been most recently indexed is the one that [FIND] will try to search in.
Cheers, Werner
42S #3249S01123
DM42 #00345
DM42 #00345
Re: [MIN],[MAX] and [FIND]...how to?
Do you mean executing the functions while the matrix editor is active, or going into the editor, exiting and then executing the functions? I can execute the functions while the matrix editor is active, but the result that would otherwise be written to the X register for MAX and MIN seems to replace the current matrix entry, and [FIND] always returns "yes".
If I exit out of the editor, even with EXITALL, the functions don't seem to work unless the matrix is explicitly indexed. This seems to be consistent with the 42S manual's suggestion that the matrix is no longer indexed once you exit out of the editor. Am I missing something here? Is there another way of executing the functions without explicitly indexing the matrix?
Sam
Re: [MIN],[MAX] and [FIND]...how to?
An example says more than a thousand words
Create the matrix
[[ 4 5 6 ]
[ 7 8 9 ]
[ 1 2 3 ]]
Then:
will produce the max of the first column of the matrix, with its row value in Y.
You are EDITing the matrix, so EXITALL will write whatever is in X into the current position, that's what the RCLEL is for.
With the same matrix in Y and the element to search for in X:
eg [[]] 7 F1 returns (2,1)
Cheers, Werner
Create the matrix
[[ 4 5 6 ]
[ 7 8 9 ]
[ 1 2 3 ]]
Then:
Code: Select all
>LBL "M"
EDIT
Rv
[MAX]
RCLEL
EXITALL
Rv
END
You are EDITing the matrix, so EXITALL will write whatever is in X into the current position, that's what the RCLEL is for.
With the same matrix in Y and the element to search for in X:
Code: Select all
>LBL "F1"
X<>Y
EDIT
Rv
[FIND]
GTO 00
0
ENTER
GTO 01
LBL 00
RCLIJ
LBL 01
COMPLEX
RCLEL
EXITALL
Rv
END
Cheers, Werner
42S #3249S01123
DM42 #00345
DM42 #00345
Re: [MIN],[MAX] and [FIND]...how to?
Thanks for the examples! RCLEL was the missing link; I somehow skipped the page in the manual where it was introduced. I should RTFM harder.
Sam