- Reworked everything for free42 3.0.2
- Refactored the code to use 10x less RAM. Probably introduced some bugs
- Polynomial roots. Still a couple todo items on this one -- let's call it a beta.
- Find matrix characteristic polynomial
- The previous two allow you to find all the eigenvalues of a matrix
- Minor linear algebra stuff
- Construct identity matrix
- Construct diagonal matrix
- Compute trace

- Repeated measurements tool now supports rank stats (median, etc...)
- Function plotter improvements
- You can now select a range on the graph on which you want to find roots or integrate
- Auto-scale has a neat little progress bar.
- You can now graphically select an x-range, and redraw the graph with auto-scale for the y-axis
- The zoom-box has a slow & fast mode to help make up for no auto-repeat for GETKEY
- It is much faster now in "connect the dots" mode

- Faster standard normal CDF & ERF computation
- Several base-n additions: bit fields, field iteration, etc..
- Better support for Julian dates
- Lots of new Emacs LISP
- Much more sophisticated menu program generation
- Automatic code conversion & clean on tangle
- Copy annotated code and transform it before putting it on the clipboard
- Generate HTML & tangle code for marked files in dired-mode

- I now include raw files in the bin/ directory for all the code
- I also now include un-annotated code listings in the src_42s directory. These can be directly cut-n-pasted into free42

## My 42s software collection update

### My 42s software collection update

I have updated my collection of 42s programs.

### Re: My 42s software collection update

You extended your repeated measurements tool. Thx for it!

### Re: My 42s software collection update

Very nice documentation!

To create an identity matrix, and a diagonal matrix from a vector without looping or matrix access:

Cheers, Werner

To create an identity matrix, and a diagonal matrix from a vector without looping or matrix access:

Code: Select all

```
00 { 49-Byte Prgm }
01▸LBL "IDN"
02 1
03 NEWMAT
04 SIGN
05▸LBL "DIAG"
06 LSTO "."
07 DIM?
08 +
09 ENTER
10 DSE ST X
11 DIM "."
12 X<> "."
13 TRANS
14 X<> "."
15 STO ST Y
16 DIM "."
17 -
18 X<> "."
19 END
```

42S #3249S01123

DM42 #00345

DM41X #01215

DM42 #00345

DM41X #01215

### Re: My 42s software collection update

OMG. I just spent the last 10min staring at this little miracle. That's fantastically clever!

What is the - for on line 17?

Can I use this code or is it copyrighted?

### Re: My 42s software collection update

The ‘-‘ is to drop the stack so that the original y and z are preserved.

Feel free to use it, of course!

Cheers, Werner

42S #3249S01123

DM42 #00345

DM41X #01215

DM42 #00345

DM41X #01215

### Re: My 42s software collection update

Thank you!

Now that I have FUNC, I don't think as much about the stack anymore.

BTW, a similar trick allows us to compute the trace of a matrix as well:

Code: Select all

```
LBL "MATTR"
FUNC 11 @@## REQ:free42>=2.5.24
L4STK @@## REQ:free42>=3.0
LSTO "_M"
DIM? @@@@ n n
1
+ @@@@ n+1 n
DIM "_M" @@@@ n+1 n -- _M is now nx(n+1) and old diag in first column
1 @@@@ 1 n+1
1 @@@@ 1 1 n+1
NEWMAT @@@@ P n+1
SIGN @@@@ P n+1 -- P is a 1x1 constant 1 matrix
LSTO "_P" @@@@ P n+1
Rv @@@@ n+1 n
1 @@@@ 1 n+1
X<>Y @@@@ n+1 1
DIM "_P" @@@@ n+1 1 -- P is now 1x(n+1) e_1 matrix
RCL "_P" @@@@ _P
RCL "_M" @@@@ _M _P
TRANS @@@@ X _P -- X is (n+1)xn matrix with diag elements in first row
× @@@@ X -- X is now a 1xn row vector of the diag elements
RSUM @@@@ X -- X is now 1x1 matrix with sum of diag elements
DET @@@@ TR -- Det of 1x1 is the matrix element
RTN
```

### Re: My 42s software collection update

Why not, after DIM "_M": (to n x n+1)

Cheers, Werner

Code: Select all

```
RCL "_M"
TRANS
STO "_M" @ diag is now first row
1
R^ @ we are in 4STK mode ;-)
DIM "_M"
RSUM
```

Last edited by whuyse on Tue May 11, 2021 8:20 am, edited 1 time in total.

42S #3249S01123

DM42 #00345

DM41X #01215

DM42 #00345

DM41X #01215