---John Randall wrote:
> Sherlock, Ric wrote:
>
> > I'm wondering whether the point on the wiki page is still
> valid and just
> > needs a different example, or whether Roots is now robust
> enough that the
> > warning is no longer required?
>
> A warning is always required for polynomial roots. If you
> could find them
> robustly, finding eigenvalues would be a lot easier.
>
> I agree that the page no longer demonstrates the point.
> However, consider
> this (note line wrap):
>
> roots=: >@(1&{)@p.
> roots p. 1;(i.20),20
> 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
> roots p. 1;(i.20),20.0001
> 19.0022j9.43931e_25 19.0022j_9.43931e_25 18.0078j5.55694e_15
> 18.0078j_5.55694e_15 16.1666j2.13971e_20 16.1666j_2.13971e_20
> 12.6895j0.0771052 12.6895j_0.0771052 12.5845 10.8835 10.05
> 8.98704 8.00238
> 6.99968 6.00002 5 4 3 2 1 0
Would you suggest that this example is a suitable replacement for the one
currently on the wiki page?
Interestingly the results I get differ from yours but are consistent whether I
run the sentence on Windows or Linux. Are you running a 64-bit version of J to
get those values?
list 1{:: p. p. 1;(i.20),20.0001
19.9995 19.0019 18.0065
16.9323 16.1564 14.528j0.213964
14.528j_0.213964 12.4603j0.0801958 12.4603j_0.0801958
10.8799 10.0496 8.9873
8.00249 6.9997 6.00002
5 4 3
2 1 0
JVERSION
Installer: j602a_win.exe
Engine: j602/2008-03-03/16:45
Library: 6.02.028
JVERSION
Installer: j602a_linux32.sh
Engine: j602/2008-03-03/16:45
Library: 6.02.026
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm