Greetings again,
This question is more about decimal precision and internal storage of numeric data in APL, but in the context of these linear algebra solutions.
So far I've implemented Householder reflection, Hessenberg decomposition, & Wilkinson shift. I am very close (I think!) to having a general solution to the eigenvalue problem in APL, but I am running into some problems.
The below tests were done with `RATIONAL_NUMBERS_WANTED=yes` & `⎕CT ← 1E¯13`, however the results were the same without this compilation flag. Let me know if I should recompile without the flag to aid debugging.
I am also unable to serialize these values to share, as noted below.
While decomposing arrays, I am left with numbers that seem to be outside the system limits for decimals.
See below:
yy
6.8642080737002189E1 ¯2.8284271247461845E1 ¯4.4789499693386752E¯15 ¯9.8275027072133962E¯15 2.7373808045404955E¯15
0.0000000000000000E0 ¯3.6420807370024026E0 ¯5.5733804042156851E¯16 ¯1.5080408441474686E¯15 3.5583710502840566E¯16
0.0000000000000000E0 0.0000000000000000E0 ¯9.1905919960774138E¯16 ¯1.7087719706038831E¯17 3.5943374532205272E¯16
0.0000000000000000E0 0.0000000000000000E0 0.0000000000000000E0 4.1320842994244806E¯16 2.4535379437658151E¯16
0.0000000000000000E0 0.0000000000000000E0 0.0000000000000000E0 0.0000000000000000E0 ¯3.0880779907613713E¯17
⌹[⎕CT] yy
DOMAIN ERROR
⌹[⎕CT]yy
^ ^
2 ⎕TF yy
RANK ERROR
2 ⎕TF yy
^ ^
10 ⎕CR yy
RANK ERROR
10 ⎕CR yy
^ ^
qt
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
2×qt
DOMAIN ERROR
2×qt
^ ^
In another calculation, I am left with this (seemingly) bizarre result:
{(⌈/⍳0) > ⍵} qt
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
I'd be happy to generate some functions, but I'll have to clean up (& properly attribute) my workspace to do so. I have not found a trivial example to demonstrate what is happening, but I thought I'd reach out in meantime to see if there is a workaround.
Thank you,
- Rowan