cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
%3CLINGO-SUB%20id%3D%22lingo-sub-345094%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%20mode%3D%22NONE%22%20mode%3D%22NONE%22%3E%E3%83%99%E3%83%BC%E3%82%AA%E3%82%A6%E3%83%AB%E3%83%95%E3%80%81%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%88%E3%83%B3%E3%80%81%E3%83%9F%E3%82%B9%E3%82%BF%E3%83%BC%E3%83%BB%E3%83%8F%E3%83%B3%E3%82%BD%E3%83%B3%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-345094%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%20mode%3D%22NONE%22%20mode%3D%22NONE%22%3E%3CP%3E1971%20%E5%B9%B4%E3%81%AE%E3%81%82%E3%82%8B%E6%97%A5%E3%80%81%E3%83%8F%E3%83%B3%E3%82%BD%E3%83%B3%E6%B0%8F%E3%81%AF%E3%81%93%E3%81%86%E8%A8%80%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%80%8C%E4%BB%8A%E6%97%A5%E3%81%AF%E6%95%B0%E5%80%A4%E3%81%AE%E5%B9%B3%E6%96%B9%E6%A0%B9%E3%82%92%E6%B1%82%E3%82%81%E3%82%8B%E6%96%B9%E6%B3%95%E3%82%92%E6%95%99%E3%81%88%E3%81%BE%E3%81%99%E3%80%82%20%E3%82%88%E3%82%8A%E3%82%82%E9%80%9F%E3%81%84%E6%96%B9%E6%B3%95%3CA%20href%3D%22https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dlong%2Bdivision%2Bsquare%2Broot%26amp%3Boq%3Dlong%2Bdivision%2Bsquare%2Broot%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%E9%95%B7%E6%9C%9F%E5%88%86%E5%89%B2%3C%2FA%3E%E7%A7%81%E3%81%8C%E6%95%99%E3%81%88%E3%82%8B%E3%81%B9%E3%81%8D%E6%96%B9%E6%B3%95%E3%80%82%20%E4%B8%80%E8%A8%80%E3%81%A7%E6%95%99%E3%81%88%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%9D%E3%81%97%E3%81%A6%E3%81%82%E3%81%AA%E3%81%9F%E3%81%AF%E6%B1%BA%E3%81%97%E3%81%A6%E5%BF%98%E3%82%8C%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E3%80%8D%E3%81%9D%E3%82%8C%E3%81%8B%E3%82%89%E5%BD%BC%E3%81%AF%E9%BB%92%E6%9D%BF%E3%81%AB%E6%9B%B8%E3%81%8D%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%3CU%3E%E6%8E%A8%E6%B8%AC%3C%2FU%3E%3C%2FP%3E%3CP%3E%E3%81%9D%E3%81%97%E3%81%A6%E3%81%9D%E3%82%8C%E3%81%AB%E4%B8%8B%E7%B7%9A%E3%82%92%E5%BC%95%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%20%E7%AC%91%E3%81%84%E3%81%8C%E5%8F%8E%E3%81%BE%E3%82%8B%E3%81%A8%E3%80%81%E5%BD%BC%E3%81%AF%E6%8E%A8%E6%B8%AC%E3%82%92%E5%85%83%E3%81%AE%E6%95%B0%E5%80%A4%E3%80%81%E5%B9%B3%E5%9D%87%E5%80%A4%E3%80%81%E7%B9%B0%E3%82%8A%E8%BF%94%E3%81%97%E5%80%A4%E3%81%AB%E5%88%86%E5%89%B2%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E8%AA%AC%E6%98%8E%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%20%E5%BD%BC%E3%81%AF%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E8%A8%80%E5%8F%8A%E3%81%97%E3%81%9F%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FNewton%2527s_method%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%88%E3%83%B3%E3%83%BB%E3%83%A9%E3%83%95%E3%82%BD%E3%83%B3%3C%2FA%3E%E3%80%82%3C%2FP%3E%3CP%3E%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%81%AE%E6%A0%B9%E3%81%BE%E3%81%9F%E3%81%AF%E9%9B%B6%E3%82%92%E6%B1%82%E3%82%81%E3%82%8B%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%88%E3%83%B3%E6%B3%95%E3%81%A7%E3%81%AF%E3%80%81%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%81%AE%E5%B0%8E%E9%96%A2%E6%95%B0%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%83%97%E3%83%AD%E3%82%BB%E3%82%B9%E3%82%92%E9%AB%98%E9%80%9F%E5%8C%96%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%2010%20%E3%81%AE%E5%B9%B3%E6%96%B9%E6%A0%B9%E3%81%AF%E3%80%81X%5E2%20%3D%3D%2010%20%E3%81%BE%E3%81%9F%E3%81%AF%20X%5E2%20%E2%80%93%2010%20%3D%3D%200%20%E3%81%A8%E3%81%AA%E3%82%8B%20X%20%E3%81%AE%E5%80%A4%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AB%E4%BC%BC%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20X%5E2%20%E2%80%93%2010%20%E3%81%AE%E5%B0%8E%E9%96%A2%E6%95%B0%E3%81%AF%202X%20%E3%81%A7%E3%80%81X%20%E3%81%AE%E9%80%A3%E7%B6%9A%E3%81%99%E3%82%8B%E5%80%A4%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%83%AB%E3%83%BC%E3%83%97%E3%81%AE%E4%B8%AD%E5%BF%83%E3%81%AF%E6%AC%A1%E3%81%AE%E3%81%A8%E3%81%8A%E3%82%8A%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3EXnew%20%3D%20X%20-%20(%20(X%5E2%20-%2010)%20%2F%20(2X)%20)%3C%2FP%3E%3CP%3E%E5%AE%9F%E9%9A%9B%E3%81%AB%E9%81%8A%E3%82%93%E3%81%A7%E3%81%BF%E3%82%8B%E3%81%A8%E3%80%81%E3%81%BE%E3%81%95%E3%81%AB%E3%81%9D%E3%82%8C%E3%81%A7%E3%81%99%E3%80%82%3CU%3E%E6%8E%A8%E6%B8%AC%3C%2FU%3E%E5%BC%8F%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%80%81%E5%88%9D%E6%9C%9F%E6%8E%A8%E5%AE%9A%E5%80%A4%202%20%E3%81%AE%E5%A0%B4%E5%90%88%E3%80%81%E6%AC%A1%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E5%8F%8E%E6%9D%9F%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CSTRONG%3E2%20%E2%80%93%20%E5%88%9D%E6%9C%9F%E6%8E%A8%E6%B8%AC%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E3.5%20%E2%80%93%20x%20%3D%20(x%20%2B%2010%2Fx)%2F2%20%E3%82%92%E9%81%A9%E7%94%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E3.17857142857143%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E3.16231942215088%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E3.16227766044414%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E3.16227766016838%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E3.16227766016838%20%E2%80%93%206%20%E5%9B%9E%E3%81%AE%E5%8F%8D%E5%BE%A9%E3%81%A7%E5%AE%89%E5%AE%9A%E3%81%97%E3%81%9F%E7%AD%94%E3%81%88%E3%81%8C%E5%BE%97%E3%82%89%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%E3%81%93%E3%81%93%E3%81%A7%E3%81%AF%E3%80%81%E3%83%87%E3%83%A2%E7%94%A8%E3%81%AE%20JSL%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E7%A4%BA%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ef%20%3D%20Expr(%20x%20%5E%202%20-%20V%20)%3B%0Astep%20%3D%20Eval%20Expr(%20x%20-%20Expr(%20Name%20Expr(%20f%20)%20)%20%2F%20Expr(%20Derivative(%20Name%20Expr(%20f%20)%2C%20x%20)%20)%20)%3B%0A%0AV%20%3D%201e2%3B%20%2F%2F%20find%20the%20sqrt%20of%20V%0Ax%20%3D%20-8%3B%20%2F%2F%20initial%20guess.%20%0A%0Axnext%20%3D%20.%3B%20%2F%2F%20set%20up%20loop%0An%20%3D%200%3B%20%2F%2F%20counter%0A%0AWhile(%201%2C%0A%20xnext%20%3D%20step%3B%0A%20If(%20Abs(%20x%20-%20xnext%20)%20%26lt%3B%20Abs(%201e-14%20*%20x%20)%2C%0A%20%20Break()%0A%20)%3B%0A%20x%20%3D%20xnext%3B%0A%20Write(%20%22%5C!n%22%2C%20n%2C%20%22%20%22%2C%20x%20)%3B%0A%20n%20%3D%20n%20%2B%201%3B%0A)%3B%0A%0AWrite(%20%22%5C!ndone%2C%20a%20root%20of%20%22%20%7C%7C%20Char(%20Name%20Expr(%20f%20)%20)%20%7C%7C%20%22%20for%20V%20%3D%20%22%20%7C%7C%20Char(%20v%20)%20%7C%7C%20%22%20is%20%22%2C%20x%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E6%9C%80%E5%88%9D%E3%81%AE%E8%A1%8C%E3%81%AF%E3%80%81V%20%E3%81%AE%E5%B9%B3%E6%96%B9%E6%A0%B9%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%81%AE%E3%81%AB%E5%BD%B9%E7%AB%8B%E3%81%A4%E5%BC%8F%20f%20%E3%82%92%E5%AE%9A%E7%BE%A9%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%202%20%E8%A1%8C%E7%9B%AE%E3%81%AE%20step%20%E3%81%AF%E3%80%811%20%E3%82%B5%E3%82%A4%E3%82%AF%E3%83%AB%E3%81%AE%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%88%E3%83%B3%E3%83%BB%E3%83%A9%E3%83%95%E3%82%BD%E3%83%B3%E5%8F%8D%E5%BE%A9%E3%81%A7%E3%81%99%E3%80%82%20step%20%E3%81%AF%20while%20%E3%83%AB%E3%83%BC%E3%83%97%E5%86%85%E3%81%AB%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%80%81%E6%AC%A1%E3%81%AE%20X%20%E5%80%A4%E3%81%AB%E8%A9%95%E4%BE%A1%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20Derivative%20%E9%96%A2%E6%95%B0%E3%81%AF%E5%8D%98%E7%B4%94%E3%81%AA%E5%A4%9A%E9%A0%85%E5%BC%8F%E3%81%A7%E3%81%86%E3%81%BE%E3%81%8F%E6%A9%9F%E8%83%BD%E3%81%97%E3%80%81%E3%81%93%E3%81%AE%E4%BE%8B%E3%81%A7%E3%81%AF%202X%20%E3%81%8C%E5%BE%97%E3%82%89%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20NameExpr()%20%E3%81%AF%E8%A9%95%E4%BE%A1%E3%81%9B%E3%81%9A%E3%81%AB%20f%20%E3%81%8B%E3%82%89%E5%BC%8F%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%80%81EvalExpr()%20%E3%81%8C%20Expr()%20%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%81%9F%E3%81%A8%E3%81%8D%E3%81%AB%20Expr()%20%E3%81%AF%20NameExpr()%20%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%BE%E3%81%99%20(%E5%BC%8F%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81)%E3%80%82%20%E3%82%B9%E3%83%86%E3%83%83%E3%83%97%E3%81%AF%20x%20-%20f(x)%2Ff'(x)%20%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3Ewhile(1)%20%E3%83%AB%E3%83%BC%E3%83%97%E5%86%85%E3%81%A7%E3%80%81%E3%82%B9%E3%83%86%E3%83%83%E3%83%97%E3%81%8C%E5%AE%9F%E8%A1%8C%E3%81%95%E3%82%8C%E3%80%81%E5%87%BA%E5%8A%9B%E3%81%95%E3%82%8C%E3%80%81%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E3%83%86%E3%82%B9%E3%83%88%E3%81%A7%E3%81%AF%E3%80%81%E7%8F%BE%E5%9C%A8%E3%81%AE%20X%20%E5%80%A4%E3%81%A8%E6%AC%A1%E3%81%AE%20X%20%E5%80%A4%E3%81%AE%E5%B7%AE%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20X%20%E3%81%AE%E7%8F%BE%E5%9C%A8%E3%81%AE%E3%82%B5%E3%82%A4%E3%82%BA%E3%81%A7%E5%80%A4%E3%81%8C%E9%9D%9E%E5%B8%B8%E3%81%AB%E5%B0%8F%E3%81%95%E3%81%84%E5%A0%B4%E5%90%88%E3%80%81%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E5%80%A4%E3%81%AF%E8%BF%91%E3%81%A5%E3%81%8B%E3%81%9A%E3%80%812%20%E3%81%A4%E3%81%AE%E9%9D%9E%E5%B8%B8%E3%81%AB%E8%BF%91%E3%81%84%E6%95%B0%E5%80%A4%E3%81%AE%E9%96%93%E3%81%A7%E5%A4%89%E5%8B%95%E3%81%99%E3%82%8B%E5%8F%AF%E8%83%BD%E6%80%A7%E3%81%8C%E3%81%82%E3%82%8B%E3%81%9F%E3%82%81%E3%80%81while%20%E3%83%AB%E3%83%BC%E3%83%97%E3%81%8B%E3%82%89%E6%8A%9C%E3%81%91%E5%87%BA%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CSTRONG%3E0%20-10.25%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E1%20-10.0030487804878%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E2%20-10.0000004646115%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E3%20-10%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E5%AE%8C%E4%BA%86%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81V%20%3D%20100%20%E3%81%AE%E5%A0%B4%E5%90%88%E3%81%AE%20x%20%5E%202%20-%20V%20%E3%81%AE%E6%A0%B9%E3%81%AF%20-10%20%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%E6%AD%A3%E3%81%AE%E5%B9%B3%E6%96%B9%E6%A0%B9%E3%81%A8%E8%B2%A0%E3%81%AE%E5%B9%B3%E6%96%B9%E6%A0%B9%E3%81%8C%E3%81%82%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AB%E6%B3%A8%E6%84%8F%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%20%E9%96%8B%E5%A7%8B%E5%80%A4%E3%81%AB%E3%82%88%E3%81%A3%E3%81%A6%E3%80%81%E5%8F%8E%E6%9D%9F%E3%81%8C%E3%81%A9%E3%81%AE%E3%83%AB%E3%83%BC%E3%83%88%E3%81%AB%E8%87%B3%E3%82%8B%E3%81%8B%E3%81%8C%E6%B1%BA%E3%81%BE%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20-8%20%E3%81%8B%E3%82%89%E5%A7%8B%E3%81%BE%E3%82%8A%20-10.25%20%E3%81%BE%E3%81%A7%E3%82%AA%E3%83%BC%E3%83%90%E3%83%BC%E3%82%B7%E3%83%A5%E3%83%BC%E3%83%88%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E3%81%9D%E3%81%AE%E5%BE%8C%20-10%20%E3%81%AB%E8%90%BD%E3%81%A1%E7%9D%80%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CP%3E(%E3%81%AA%E3%81%9C%E5%B0%8E%E9%96%A2%E6%95%B0%20f'%20%E3%81%A7%E5%89%B2%E3%82%8B%E3%81%AE%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%81%8B%3F%20%E7%9B%B4%E6%84%9F%E7%9A%84%E3%81%AB%E3%81%AF%E3%80%81%E7%B7%9A%20f%20%E3%81%AE%E5%82%BE%E3%81%8D%E3%81%8C%E3%82%BC%E3%83%AD%E3%81%AB%E8%BF%91%E3%81%84%E5%A0%B4%E5%90%88%E3%80%81f%20%E3%81%AE%20Y%20%E7%B5%90%E6%9E%9C%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E6%AC%A1%E3%81%AE%E7%82%B9%E3%82%92%E3%81%95%E3%82%89%E3%81%AB%E9%81%A0%E3%81%8F%E3%81%AB%E7%BD%AE%E3%81%8F%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%80%81%E5%82%BE%E3%81%8D%E3%81%A7%E5%89%B2%E3%82%8B%E3%81%93%E3%81%A8%E3%81%A7%E3%81%9D%E3%82%8C%E3%81%8C%E8%A1%8C%E3%82%8F%E3%82%8C%E3%81%BE%E3%81%99)%E3%80%82%3C%2FP%3E%3CP%3E%E4%B8%8A%E8%A8%98%E3%81%AE%20JSL%20%E3%81%AF%E3%80%81%E4%B8%8D%E5%8F%AF%E8%83%BD%E3%81%AA%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%82%92%E3%81%86%E3%81%BE%E3%81%8F%E5%87%A6%E7%90%86%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%20sqrt(-100)%20%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E8%A6%81%E6%B1%82%E3%81%95%E3%82%8C%E3%81%9F%E5%A0%B4%E5%90%88%E3%80%81JSL%20%E3%81%AF%E3%83%AB%E3%83%BC%E3%83%97%E3%81%97%E3%81%A6%E3%80%81%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84%E8%A4%87%E7%B4%A0%E6%95%B0%E3%82%92%E6%8E%A2%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%225%22%3E%E8%A4%87%E7%B4%A0%E6%95%B0%3C%2FFONT%3E%3C%2FP%3E%3CP%3EJSL%20%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%20%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%81%A7%20complex%20%E3%82%92%E6%A4%9C%E7%B4%A2%E3%81%99%E3%82%8B%E3%81%A8%E3%80%812%20%E3%81%A4%E3%81%AE%E7%95%B0%E3%81%AA%E3%82%8B%E4%B8%AD%E9%80%94%E5%8D%8A%E7%AB%AF%E3%81%AA%E4%BE%8B%E3%81%8C%E7%94%9F%E6%88%90%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%201%20%E3%81%A4%E3%81%AF%20JSL%20%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%AB%E5%9F%BA%E3%81%A5%E3%81%84%E3%81%A6%E3%81%8A%E3%82%8A%E3%80%81%E3%82%82%E3%81%86%201%20%E3%81%A4%E3%81%AF%E5%90%8D%E5%89%8D%E7%A9%BA%E9%96%93%E3%81%A8%E8%A1%8C%E5%88%97%E3%81%AB%E5%9F%BA%E3%81%A5%E3%81%84%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E3%83%9E%E3%83%88%E3%83%AA%E3%83%83%E3%82%AF%E3%82%B9%20%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%AE%E6%96%B9%E3%81%8C%E5%A0%85%E7%89%A2%E3%81%AA%E3%82%BD%E3%83%AA%E3%83%A5%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AB%E8%BF%91%E3%81%8F%E3%80%81%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E9%AB%98%E9%80%9F%E3%81%A7%E3%81%82%E3%82%8B%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E3%82%AF%E3%83%A9%E3%82%B9%E7%89%88%E3%81%AF%E9%AD%85%E5%8A%9B%E7%9A%84%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%AE%E3%81%AB%E8%8B%A6%E5%8A%B4%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%20(%E9%80%9F%E5%BA%A6%E3%80%81%E3%83%A1%E3%83%A2%E3%83%AA%E3%81%AE%E5%95%8F%E9%A1%8C)%E3%80%82%20JMP%20%E3%81%AB%E3%81%AF%E6%BC%94%E7%AE%97%E5%AD%90%E7%94%A8%E3%81%AE%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BC%20%E3%82%AA%E3%83%BC%E3%83%90%E3%83%BC%E3%83%AD%E3%83%BC%E3%83%89%E3%81%8C%E3%81%AA%E3%81%84%E3%81%9F%E3%82%81%E3%80%81%E3%81%A9%E3%81%A1%E3%82%89%E3%82%82%E4%BD%BF%E3%81%84%E3%82%84%E3%81%99%E3%81%84%E3%82%82%E3%81%AE%E3%81%A7%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%93%E3%81%AE%20JSL%20%E3%81%AF%E5%89%8D%E3%81%AE%20JSL%20%E3%81%A8%E9%9D%9E%E5%B8%B8%E3%81%AB%E3%82%88%E3%81%8F%E4%BC%BC%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E5%A4%9A%E3%81%8B%E3%82%8C%E5%B0%91%E3%81%AA%E3%81%8B%E3%82%8C%E5%90%8C%E3%81%98%E5%BC%8F%E3%81%A7%E3%81%82%E3%82%8B%E8%A4%87%E7%B4%A0%E6%95%B0%E3%81%AE%E7%AE%97%E8%A1%93%E3%82%92%E5%87%A6%E7%90%86%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E5%A4%A7%E3%81%8D%E3%81%AA%E5%A1%8A%E3%81%8C%E3%81%82%E3%82%8A%E3%80%81sqrt(-100)%20%E3%82%82%E5%87%A6%E7%90%86%E3%81%A7%E3%81%8D%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ens%20%3D%20New%20Namespace(%22complex%22%2C%20%2F%2F%20adapted%20from%20scripting%20index%20example%0A%20%7B%0A%20%20make%20%3D%20Function(%20%7Ba%2C%20b%7D%2C%20a%20%7C%7C%20b%20)%2C%0A%20%20add%20%3D%20Function(%20%7Bx%2C%20y%2C%20t%3D%5B0%200%5D%2C%20u%3D%5B0%200%5D%2C%20v%3D%5B0%200%5D%2C%20w%3D%5B0%200%5D%7D%2C%20%2F%2F%20an%20example%20has%205%20terms%0A%20%20%20if(%20Is%20Number(%20x%20)%2Cx%20%3D%20x%20%7C%7C%200)%3B%0A%20%20%20if(%20Is%20Number(%20y%20)%2Cy%20%3D%20y%20%7C%7C%200)%3B%0A%20%20%20x%20%2B%20y%20%2B%20t%20%2B%20u%20%2B%20v%20%2B%20w%3B%0A%20%20)%2C%0A%20%20sub%20%3D%20Function(%20%7Bx%2C%20y%2C%20t%3D%5B0%200%5D%2C%20u%3D%5B0%200%5D%2C%20v%3D%5B0%200%5D%2C%20w%3D%5B0%200%5D%7D%2C%20%2F%2F%20an%20example%20has%203%20terms.%20this%20sub%2Cadd%20trick%20is%20good%20enough%20for%20a%20demo.%0A%20%20%20if(%20Is%20Number(%20x%20)%2Cx%20%3D%20x%20%7C%7C%200)%3B%0A%20%20%20if(%20Is%20Number(%20y%20)%2Cy%20%3D%20y%20%7C%7C%200)%3B%0A%20%20%20x%20-%20y%20-%20t%20-%20u%20-%20v%20-%20w%3B%0A%20%20)%2C%0A%20%20mul%20%3D%20Function(%20%7Bx%2C%20y%7D%2C%0A%20%20%20if(%20Is%20Number(%20x%20)%2Cx%20%3D%20x%20%7C%7C%200)%3B%0A%20%20%20if(%20Is%20Number(%20y%20)%2Cy%20%3D%20y%20%7C%7C%200)%3B%0A%20%20%20local%3Az%20%3D%20J(%201%2C%202%20)%3B%0A%20%20%20local%3Az%5B1%5D%20%3D%20x%5B1%5D%20*%20y%5B1%5D%20-%20x%5B2%5D%20*%20y%5B2%5D%3B%0A%20%20%20local%3Az%5B2%5D%20%3D%20x%5B1%5D%20*%20y%5B2%5D%20%2B%20x%5B2%5D%20*%20y%5B1%5D%3B%0A%20%20%20local%3Az%3B%0A%20%20)%2C%0A%20%20div%20%3D%20Function(%20%7Bx%2C%20y%7D%2C%0A%20%20%20if(%20Is%20Number(%20x%20)%2Cx%20%3D%20x%20%7C%7C%200)%3B%0A%20%20%20if(%20Is%20Number(%20y%20)%2Cy%20%3D%20y%20%7C%7C%200)%3B%0A%20%20%20local%3Az%20%3D%20J(%201%2C%202%20)%3B%0A%20%20%20local%3Ad%20%3D%20(y%5B1%5D%20%5E%202%20%2B%20y%5B2%5D%20%5E%202)%3B%0A%20%20%20local%3Az%5B1%5D%20%3D%20(x%5B1%5D%20*%20y%5B1%5D%20%2B%20x%5B2%5D%20*%20y%5B2%5D)%20%2F%20local%3Ad%3B%0A%20%20%20local%3Az%5B2%5D%20%3D%20(x%5B2%5D%20*%20y%5B1%5D%20-%20x%5B1%5D%20*%20y%5B2%5D)%20%2F%20local%3Ad%3B%0A%20%20%20local%3Az%3B%0A%20%20)%2C%0A%20%20%2F%2F%20https%3A%2F%2Fmath.stackexchange.com%2Fquestions%2F1397437%2Fformula-for-raising-a-complex-number-to-a-power%0A%20%20%2F%2F%20If%20a%2Cb%20are%20real%2C%20then%20a%2Bib%3Dr(cos%CE%B8%2Bi*sin%CE%B8)%20where%20r%5E2%3Da%5E2%2Bb%5E2%20and%20tan%CE%B8%3Db%2Fa%2C%20and%20(a%20%2B%20i*b)%5EN%20%3D%20r%5EN(cos(N%CE%B8)%20%2B%20i*sin(N%CE%B8))%0A%20%20pow%20%3D%20function(%20%7Bc%2C%20n%7D%2C%0A%20%20%20if(%20Is%20Number(%20c%20)%2Cc%20%3D%20c%20%7C%7C%200)%3B%0A%20%20%20local%3Aa%20%3D%20c%5B1%5D%3B%0A%20%20%20local%3Ab%20%3D%20c%5B2%5D%3B%0A%20%20%20local%3Atheta%20%3D%20ATan(%20local%3Ab%2C%20local%3Aa%20)%3B%0A%20%20%20local%3Ar%20%3D%20Sqrt(%20local%3Aa%20%5E%202%20%2B%20local%3Ab%20%5E%202%20)%3B%0A%20%20%20local%3Ar%20%5E%20n%20*%20(Cos(%20n%20*%20local%3Atheta%20)%20%7C%7C%20Sin(%20n%20*%20local%3Atheta%20))%3B%0A%20%20)%2C%0A%20%20abs%20%3D%20function(%20%7Bx%7D%2C%0A%20%20%20Sqrt(%20x%5B1%5D%20%5E%202%20%2B%20x%5B2%5D%20%5E%202%20)%0A%20%20)%2C%0A%20%20toChar%20%3D%20Function(%20%7Bx%2Cw%3D20%2Cd%3D14%7D%2C%20%2F%2F%20rounding%20(to%2014%20places)%20is%20not%20a%20good%20idea%20if%20the%20numbers%20are%20small%20(%201e-9%20will%20lose%20lots%20of%20precision)%0A%20%20%20Char(%20round(x%5B1%5D%2Cd)%2Cw%20)%20%7C%7C%20%22%2B%22%20%7C%7C%20Char(%20round(x%5B2%5D%2Cd)%2Cw%20)%20%7C%7C%20%22i%22%0A%20%20)%2C%0A%20%20convertExpression%20%3D%20function(%20%7Be%7D%2C%0A%20%20%20substitute(%20Name%20Expr(%20e%20)%2C%0A%20%20%20%20Expr(%20Add()%20)%2C%20Expr(%20complex%3Aadd()%20)%2C%0A%20%20%20%20Expr(%20Subtract()%20)%2C%20Expr(%20complex%3Asub()%20)%2C%0A%20%20%20%20Expr(%20Multiply()%20)%2C%20Expr(%20complex%3Amul()%20)%2C%0A%20%20%20%20Expr(%20Divide()%20)%2C%20Expr(%20complex%3Adiv()%20)%2C%0A%20%20%20%20Expr(%20Power()%20)%2C%20Expr(%20complex%3Apow()%20)%0A%20%20%20)%0A%20%20)%0A%20%7D%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E4%B8%8A%E8%A8%98%E3%81%A7%E3%81%AF%E3%80%81x%5E2%20%E3%81%BE%E3%81%9F%E3%81%AF%20x%5E3%20%E3%81%AA%E3%81%A9%E3%81%AE%20pow()%20%E9%96%A2%E6%95%B0%20(x%20%E3%81%AF%E8%A4%87%E7%B4%A0%E6%95%B0)%E3%80%81abs()%20%E9%96%A2%E6%95%B0%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%81%93%E3%82%8C%E3%81%AF%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E3%80%81magnitude()%20%E3%81%A8%E5%91%BC%E3%81%B0%E3%82%8C%E3%82%8B%E3%81%AF%E3%81%9A%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81abs%20%E3%81%A8%E3%81%97%E3%81%A6%E3%81%AE%E9%9D%9E%E8%A4%87%E7%B4%A0%E6%95%B0%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%A8%E4%B8%80%E8%87%B4%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20-%20add()%20%E3%81%A8%20sub()%20%E3%81%AE%E8%BF%BD%E5%8A%A0%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%81%A8%E3%80%81convertExpression()%20%E9%96%A2%E6%95%B0%E3%82%92%E6%8E%A2%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E7%90%86%E8%A7%A3%E3%81%97%E3%82%84%E3%81%99%E3%81%84%20pow()%20%E9%96%A2%E6%95%B0%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E3%80%81stackexchange%2FMichael%20Hardy%20%E3%81%AB%E5%A4%A7%E3%81%84%E3%81%AB%E6%84%9F%E8%AC%9D%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3EConvertExpression%20%E9%96%A2%E6%95%B0%E3%81%AF%E3%80%81%2B%E3%80%81-%E3%80%81*%E3%80%81%2F%E3%80%81%E3%81%8A%E3%82%88%E3%81%B3%20%5E%20%E6%BC%94%E7%AE%97%E5%AD%90%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%9F%20JSL%20%E5%BC%8F%E3%82%92%E3%80%81%E8%A4%87%E9%9B%91%E3%81%AA%E5%90%8D%E5%89%8D%E7%A9%BA%E9%96%93%E9%96%A2%E6%95%B0%E3%82%92%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%99%E5%90%8C%E7%AD%89%E3%81%AE%E5%BC%8F%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20JSL%20%E3%81%AE%E4%BA%8C%E9%A0%85%E6%BC%94%E7%AE%97%E5%AD%90%E3%81%AF%E3%80%81((a%2Bb)%2B(c%2Bd))%20%E3%82%92%E4%BA%8C%E9%A0%85%E9%96%A2%E6%95%B0%E3%81%A7%E3%81%AF%E3%81%AA%E3%81%84%20add(a%2Cb%2Cc%2Cd)%20%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AB%E9%9D%9E%E5%B8%B8%E3%81%AB%E7%A9%8D%E6%A5%B5%E7%9A%84%E3%81%A7%E3%81%99...%E5%BC%95%E6%95%B0%E3%81%8C%204%20%E3%81%A4%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%9D%E3%81%AE%E3%81%9F%E3%82%81%E3%80%81complex%3Aadd%20%E9%96%A2%E6%95%B0%E3%81%A8%20%3Asub%20%E9%96%A2%E6%95%B0%E3%81%AB%E3%81%AF%E8%BF%BD%E5%8A%A0%E3%81%AE%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E5%BC%95%E6%95%B0%E3%81%8C%E5%AD%98%E5%9C%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3EJSL%20%E3%81%AE%E6%AC%A1%E3%81%AE%E9%83%A8%E5%88%86%E3%81%A7%E3%81%AF%E3%80%81%E5%B0%86%E6%9D%A5%E3%81%AE%E9%96%8B%E7%99%BA%E3%82%92%E4%BA%88%E6%B8%AC%E3%81%97%E3%81%A6%E3%83%AB%E3%83%BC%E3%83%97%E3%82%92%E9%96%A2%E6%95%B0%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Efindzero%20%3D%20function(%20%7Bx%7D%2C%0A%20%7Bxnext%2C%20n%7D%2C%0A%20xnext%20%3D%20.%3B%20%2F%2F%20set%20up%20loop%0A%20n%20%3D%200%3B%20%2F%2F%20counter%0A%0A%20While(%20n%20%26lt%3B%20200%2C%0A%20%20xnext%20%3D%20step%3B%0A%20%20If(%20complex%3AAbs(%20complex%3Asub(%20x%2C%20xnext%20)%20)%20%26lt%3B%201e-14%20*%20complex%3Aabs(%20x%20)%2C%0A%20%20%20Break()%0A%20%20)%3B%0A%20%20x%20%3D%20xnext%3B%0A%20%20n%20%3D%20n%20%2B%201%3B%0A%20)%3B%0A%20If(%20n%20%3D%3D%20200%2C%20x%20%3D%20%5B.%20.%5D%20)%3B%0A%0A%20Eval%20List(%20%7Bx%2C%20n%7D%20)%3B%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Efindzero%20%E3%81%AF%E9%96%8B%E5%A7%8B%E7%82%B9%20x%20%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%80%81%E5%8F%8D%E5%BE%A9%E8%A7%A3%20x%20%E3%81%A8%E5%8F%8D%E5%BE%A9%E5%9B%9E%E6%95%B0%20n%20%E3%82%92%E5%90%AB%E3%82%80%E3%83%AA%E3%82%B9%E3%83%88%E3%82%92%E8%BF%94%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%9D%E3%81%97%E3%81%A6%E9%96%A2%E6%95%B0%E3%82%92%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%99%E3%82%B3%E3%83%BC%E3%83%89%E2%80%A6%E8%A4%87%E7%B4%A0%E6%95%B0%E3%81%AE%E5%A0%B4%E5%90%88%E3%80%81%E5%85%AC%E5%BC%8F%E3%81%A8%E5%B0%8E%E9%96%A2%E6%95%B0%E3%81%AF%E5%90%8C%E3%81%98%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ef%20%3D%20Expr(%20x%20%5E%202%20-%20V%20)%3B%0Astep%20%3D%20Eval%20Expr(%20x%20-%20Expr(%20Name%20Expr(%20f%20)%20)%20%2F%20Expr(%20Derivative(%20Name%20Expr(%20f%20)%2C%20x%20)%20)%20)%3B%0Astep%20%3D%20complex%3AconvertExpression(%20Name%20Expr(%20step%20)%20)%3B%0A%0AV%20%3D%20complex%3Amake(%20-100%2C%200%20)%3B%20%2F%2F%20find%20the%20sqrt%20of%20V%3D%3D-100%0Ax%20%3D%20complex%3Amake(%200%2C%201%20)%3B%20%2F%2F%20initial%20guess.%20Does%20not%20like%200i%20for%20a%20start%20value.%0A%0A%7Bx%2C%20n%7D%20%3D%20findzero(%20x%20)%3B%0A%0AWrite(%20%22%5C!ndone%2C%20a%20root%20of%20%22%20%7C%7C%20Char(%20Name%20Expr(%20f%20)%20)%20%7C%7C%20%22%20for%20V%20%3D%20%22%20%7C%7C%20complex%3AtoChar(%20v%2C%2010%2C%205%20)%20%7C%7C%20%22%20is%20%22%2C%20complex%3AtoChar(%20x%2C%2010%2C%205%20)%20)%3B%0AEval(%20complex%3AconvertExpression(%20Name%20Expr(%20f%20)%20)%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E3%20%E8%A1%8C%E7%9B%AE%E3%81%AF%E3%80%81convertExpression%20%E9%96%A2%E6%95%B0%E3%82%92%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%97%E3%81%A6%E3%80%81%2B%E3%80%81-%E3%80%81*%E3%80%81%2F%E3%80%81%5E%20%E6%BC%94%E7%AE%97%E5%AD%90%E3%82%92%E5%AE%9F%E6%95%B0%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%8B%E3%82%89%E8%A4%87%E7%B4%A0%E6%95%B0%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%AB%E5%A4%89%E6%9B%B4%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20V%20%E3%81%AF%E8%A4%87%E7%B4%A0%E6%95%B0%E5%80%A4%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%80%81%E5%88%9D%E6%9C%9F%E9%96%8B%E5%A7%8B%E7%82%B9%E3%81%AF%E5%AE%9F%E6%95%B0%E7%9B%B4%E7%B7%9A%E3%81%8B%E3%82%89%E5%A4%96%E3%82%8C%E3%81%9F%E7%82%B9%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E5%AE%8C%E4%BA%86%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E3%83%AD%E3%82%B0%E3%81%AB%E6%AC%A1%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%3C%2FP%3E%3CP%3E%3CSTRONG%3EV%20%3D%20-100%2B0i%20%E3%81%AE%20x%20%5E%202%20-%20V%20%E3%81%AE%E6%A0%B9%E3%81%AF%200%2B10i%20%E3%81%A7%E3%81%99%E3%80%82%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%5B0%200%5D%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EV%3D-100%20%2B%200i%20%E3%81%AF%E3%80%81%E5%AE%9F%E6%95%B0%20-100%20(%E8%99%9A%E6%95%B0%E6%88%90%E5%88%86%E3%81%AA%E3%81%97)%20%E3%81%A7%E3%81%99%E3%80%820%20%2B%2010i%20%E3%81%AF%E3%80%81%E5%AE%9F%E6%95%B0%E6%88%90%E5%88%86%E3%81%AE%E3%81%AA%E3%81%84%E7%B4%94%E7%B2%8B%E3%81%AA%E8%99%9A%E6%95%B0%E3%81%AE%E7%AD%94%E3%81%88%E3%81%A7%E3%81%99%E3%80%82%2010i%20*%2010i%20%E3%81%AF%E3%80%81%E4%BA%88%E6%83%B3%E3%81%A9%E3%81%8A%E3%82%8A%20100*(i%5E2)%E3%80%81%E3%81%A4%E3%81%BE%E3%82%8A%20-100%20%E3%81%A7%E3%81%99%E3%80%82%20%E8%A4%87%E7%B4%A0%E6%A0%B9%E3%81%AF%E5%85%B1%E5%BD%B9%E3%83%9A%E3%82%A2%E3%81%A7%E7%99%BA%E7%94%9F%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%88%E3%83%B3%E6%B3%95%E3%81%AF%E5%87%BA%E7%99%BA%E7%82%B9%E3%81%AB%E5%9F%BA%E3%81%A5%E3%81%84%E3%81%A6%201%20%E3%81%A4%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%20%E3%82%82%E3%81%861%E3%81%A4%E3%81%AF-10i%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%97%E3%81%A6%E3%80%81%E8%A4%87%E7%B4%A0%E5%B9%B3%E9%9D%A2%E5%86%85%E3%81%AE%E5%A4%9A%E6%95%B0%E3%81%AE%E7%82%B9%E3%81%AE%E5%8F%8D%E5%BE%A9%E5%9B%9E%E6%95%B0%20n%20%E3%82%92%E8%BF%BD%E8%B7%A1%E3%81%97%E3%80%81%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E7%AD%89%E9%AB%98%E7%B7%9A%E3%83%97%E3%83%AD%E3%83%83%E3%83%88%E3%81%A8%E3%81%97%E3%81%A6%E3%82%B0%E3%83%A9%E3%83%95%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%80%81%E4%BA%8C%E6%AC%A1%E9%96%A2%E6%95%B0%E3%81%AE%E4%BB%A3%E3%82%8F%E3%82%8A%E3%81%AB%E4%B8%89%E6%AC%A1%E9%96%A2%E6%95%B0%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%BE%E3%81%97%E3%82%87%E3%81%86%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ef%20%3D%20Expr(%20x%20%5E%203%20-%20V%20)%3B%0Astep%20%3D%20Eval%20Expr(%20x%20-%20Expr(%20Name%20Expr(%20f%20)%20)%20%2F%20Expr(%20Derivative(%20Name%20Expr(%20f%20)%2C%20x%20)%20)%20)%3B%0A%0Astep%20%3D%20complex%3AconvertExpression(%20Name%20Expr(%20step%20)%20)%3B%0A%0AV%20%3D%20complex%3Amake(%20-2%2C%200%20)%3B%20%2F%2F%20find%20the%20sqrt%20of%20V%3D%3D-2%0A%0Adt%20%3D%20New%20Table(%20%22complex%22%2CNew%20Column(%20%22xre%22%20)%2CNew%20Column(%20%22yim%22%20)%2CNew%20Column(%20%22iterations%22%20)%2CNew%20Column(%20%22basinr%22%20)%2CNew%20Column(%20%22basini%22%20))%3B%0Astepsize%3D1%2F32%3B%0Afor(xreal%3D-2%2Cxreal%26lt%3B%3D2%2Cxreal%2B%3Dstepsize%2C%0A%20for(yimag%3D-2%2Cyimag%26lt%3B%3D2%2Cyimag%2B%3Dstepsize%2C%0A%20%20x%20%3D%20complex%3Amake(%20xreal%2C%20yimag%20)%3B%20%2F%2F%20initial%20guess.%20Does%20not%20like%200i%20for%20a%20start%20value.%0A%20%20%7Bx%2C%20n%7D%20%3D%20findzero(%20x%20)%3B%0A%20%20dt%26lt%3B%3CADDROWS%3E%3C%2FADDROWS%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E5%90%8C%E3%81%98%E6%A0%B9%E3%81%BE%E3%81%A7%E5%8F%8D%E5%BE%A9%E3%81%99%E3%82%8B%E8%A4%87%E7%B4%A0%E5%B9%B3%E9%9D%A2%E5%86%85%E3%81%AE%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E7%82%B9%E3%81%8C%E7%9B%86%E5%9C%B0%E3%82%92%E5%BD%A2%E6%88%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E4%B8%8A%E8%A8%98%E3%81%A7%E3%81%AF%E3%80%81%E3%82%B0%E3%83%A9%E3%83%95%20%E3%83%93%E3%83%AB%E3%83%80%E3%83%BC%E3%81%AF%E5%AE%9F%E6%95%B0%E3%81%A8%E8%99%9A%E6%95%B0%E3%82%92%E5%8D%98%E4%B8%80%E3%81%AE%E5%80%A4%E3%81%AB%E7%B5%90%E5%90%88%E3%81%97%E3%81%A6%E3%83%AB%E3%83%BC%E3%83%88%E3%82%92%E8%AD%98%E5%88%A5%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%93%E3%81%AE%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%E3%81%AB%E3%81%AF%E3%80%813%20%E3%81%A4%E3%81%AE%E7%9B%86%E5%9C%B0%E3%81%8C%E8%B5%A4%E3%80%81%E3%82%B7%E3%82%A2%E3%83%B3%E3%80%81%E3%83%80%E3%83%BC%E3%82%AF%E3%83%96%E3%83%AB%E3%83%BC%E3%81%A7%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E8%B5%A4%E8%89%B2%E3%81%AE%E9%96%8B%E5%A7%8B%E7%82%B9%E3%81%AF%E5%90%8C%E3%81%98%E5%80%A4%E3%81%AB%E5%8F%8E%E6%9D%9F%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E3%83%89%E3%83%83%E3%83%88%20%E3%82%B5%E3%82%A4%E3%82%BA%E3%81%8C%E5%A4%A7%E3%81%8D%E3%81%8F%E3%81%AA%E3%82%8B%E3%81%A8%E3%80%81%E5%8F%8E%E6%9D%9F%E3%81%99%E3%82%8B%E3%81%BE%E3%81%A7%E3%81%AB%E6%99%82%E9%96%93%E3%81%8C%E3%81%8B%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E7%81%B0%E8%89%B2%E3%81%AE%E3%82%B9%E3%83%9D%E3%83%83%E3%83%88%E3%81%AF%20200%20%E5%9B%9E%E3%81%AE%E5%8F%8D%E5%BE%A9%E5%BE%8C%E3%82%82%E5%8F%8E%E6%9D%9F%E3%81%97%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Three%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Three%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Three%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Three%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Three%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F29149i3A980A35C0700DC6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22GraphBasinXCube2.png%22%20alt%3D%22Three%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EThree%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EThree%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EThree%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EThree%20basins.%20Larger%20dots%20where%20the%20basins%20touch%20take%20longer%20to%20converge.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E%E7%9B%86%E5%9C%B0%E3%81%8C%EF%BC%93%E3%81%A4%E3%80%82%20%E7%9B%86%E5%9C%B0%E3%81%8C%E6%8E%A5%E8%A7%A6%E3%81%99%E3%82%8B%E5%A4%A7%E3%81%8D%E3%81%AA%E3%83%89%E3%83%83%E3%83%88%E3%81%AF%E3%80%81%E5%8F%8E%E6%9D%9F%E3%81%99%E3%82%8B%E3%81%BE%E3%81%A7%E3%81%AB%E6%99%82%E9%96%93%E3%81%8C%E3%81%8B%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EJSL%20%E8%A4%87%E7%B4%A0%E6%95%B0%E5%AE%9F%E8%A3%85%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E7%94%BB%E5%83%8F%E3%81%AE%E3%82%B5%E3%82%A4%E3%82%BA%E3%82%92%2016K%20%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%81%8B%E3%82%89%2065K%20%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%81%AB%202%20%E5%80%8D%E3%81%AB%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%80%8110%20%E5%88%86%E7%A8%8B%E5%BA%A6%E3%81%8B%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%204Kx2K%20%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%81%AE%2010%2C000%20%E3%83%93%E3%83%83%E3%83%88%E3%83%9E%E3%83%83%E3%83%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%81%9F%E3%81%84%E3%81%AE%E3%81%A7%E3%80%81%E5%88%A5%E3%81%AE%E3%82%A2%E3%83%97%E3%83%AD%E3%83%BC%E3%83%81%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%225%22%3E%E3%83%99%E3%82%AA%E3%82%A6%E3%83%AB%E3%83%95%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%BF%E3%83%BC%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%E3%81%82%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBeowulf_cluster%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%E3%83%99%E3%82%AA%E3%82%A6%E3%83%AB%E3%83%95%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%BF%E3%83%BC%3C%2FA%3E%E5%8F%A4%E3%81%84%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%AE%E5%B1%B1%E3%81%A7%E3%80%81%E3%81%BB%E3%81%A8%E3%82%93%E3%81%A9%E3%81%8C%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%82%84%E3%82%AD%E3%83%BC%E3%83%9C%E3%83%BC%E3%83%89%E3%81%8C%E3%81%AA%E3%81%8F%E3%80%81LAN%20%E4%B8%8A%E3%81%A7%E5%88%B6%E5%BE%A1%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%AB%E6%8E%A5%E7%B6%9A%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E7%A7%81%E3%81%AE%E5%A0%B4%E5%90%88%E3%80%81%E5%88%B6%E5%BE%A1%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%AF%20JSL%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%BF%E3%83%BC%E3%81%AB%E4%BD%95%E3%82%92%E3%81%99%E3%81%B9%E3%81%8D%E3%81%8B%E3%82%92%E6%8C%87%E7%A4%BA%E3%81%97%E3%80%81%E7%B5%90%E6%9E%9C%E3%82%92%E5%8F%8E%E9%9B%86%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20Linux%20%E3%83%99%E3%83%BC%E3%82%B9%E3%81%AE%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%BF%E3%83%BC%E3%81%AF%E3%80%81JMP%20%E3%81%8C%E4%BD%9C%E6%88%90%E3%81%97%E3%81%9F%20Python%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20JMP%20%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%20Windows%20%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF%E3%81%AF%E3%80%81RunProgram%20%E3%81%AE%20PLINK%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%80%81%E5%90%84%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF%E4%B8%8A%E3%81%A7%201%20%E3%81%A4%E4%BB%A5%E4%B8%8A%E3%81%AE%20SSH%20%E3%82%BB%E3%83%83%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%92%E9%96%8B%E3%81%8D%E3%80%81%E5%BF%85%E8%A6%81%E3%81%AA%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%A8%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%82%92%E6%8F%90%E4%BE%9B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20Python%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%8C%E5%AE%9F%E8%A1%8C%E3%81%95%E3%82%8C%E3%80%81%E7%B5%90%E6%9E%9C%E3%81%8C%20NFS%20%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%81%AB%E4%BF%9D%E5%AD%98%E3%81%95%E3%82%8C%E3%81%A6%E7%B5%82%E4%BA%86%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20JMP%20%E3%81%AF%20RunProgram%20%E3%81%AE%E7%B5%82%E4%BA%86%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E7%B5%90%E6%9E%9C%E3%82%92%E5%8F%8E%E9%9B%86%E3%81%97%E3%80%81%E6%AC%A1%E3%81%AE%20RunProgram%20%E3%82%92%E9%96%8B%E5%A7%8B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%2010%2C000%20RunPrograms%20%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%A8%E3%80%815%20%E5%88%86%E9%96%93%E3%81%AE%E3%83%93%E3%83%87%E3%82%AA%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%AE%E3%81%AB%E5%8D%81%E5%88%86%E3%81%AA%E7%94%BB%E5%83%8F%E3%81%8C%E7%94%9F%E6%88%90%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Ethernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Ethernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Ethernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Ethernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Ethernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F29151i32B3C0BC3036AAE7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22BeowulfClusterKeepingAtticWarm.png%22%20alt%3D%22Ethernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EEthernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EEthernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EEthernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EEthernet%20hub%20in%20center%2C%20below%20power-strip.%20Not%20enough%20mice%20and%20monitors%20and%20keyboards%2C%20SSH%20is%20best.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E%E4%B8%AD%E5%A4%AE%E3%81%AE%E9%9B%BB%E6%BA%90%E3%82%BF%E3%83%83%E3%83%97%E3%81%AE%E4%B8%8B%E3%81%AB%E3%81%82%E3%82%8B%E3%82%A4%E3%83%BC%E3%82%B5%E3%83%8D%E3%83%83%E3%83%88%20%E3%83%8F%E3%83%96%E3%80%82%20%E3%83%9E%E3%82%A6%E3%82%B9%E3%80%81%E3%83%A2%E3%83%8B%E3%82%BF%E3%83%BC%E3%80%81%E3%82%AD%E3%83%BC%E3%83%9C%E3%83%BC%E3%83%89%E3%81%8C%E8%B6%B3%E3%82%8A%E3%81%AA%E3%81%84%E3%81%AE%E3%81%A7%E3%80%81SSH%20%E3%81%8C%E6%9C%80%E9%81%A9%E3%81%A7%E3%81%99%E3%80%82%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EPython%20%E3%81%AB%E3%81%AF%E3%83%8D%E3%82%A4%E3%83%86%E3%82%A3%E3%83%96%E3%81%AE%E8%A4%87%E7%B4%A0%E6%95%B0%E3%83%87%E3%83%BC%E3%82%BF%E5%9E%8B%E3%81%8C%E3%81%82%E3%82%8B%E3%81%9F%E3%82%81%E3%80%81%E4%B8%8A%E8%A8%98%E3%81%AE%20JSL%20%E3%81%AE%E4%B8%80%E9%83%A8%E3%81%AF%E5%BB%83%E6%AD%A2%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20JSL%20%E3%81%AF%E6%AC%A1%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E5%B0%91%E3%81%97%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E6%96%87%E5%AD%97%E5%88%97%E3%81%A8%E3%81%97%E3%81%A6%E5%9F%8B%E3%82%81%E8%BE%BC%E3%81%BE%E3%82%8C%E3%81%9F%20Python%20%E3%81%8C%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EF%20%3D%20Expr(%20%2F%2F%20f%20and%20e%20parameters%20are%20driven%20by%20the%20frame%20animation%20time%0A%20f6%20*%20xOld%20%5E%20e6%20%2B%20f5%20*%20xOld%20%5E%20e5%20%2B%20f4%20*%20xOld%20%5E%20e4%20%2B%20f3%20*%20xOld%20%5E%20e3%20%2B%20f2%20*%20xOld%20%5E%20e2%20%2B%20f1%20*%20xOld%20%5E%20e1%20-%201%0A)%3B%20%2F%2F%20%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%20supply%20equation%20here%20%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%0Ascale%20%3D%202%20%2F%201%3B%0Axresolution%20%3D%201920%20*%20scale%3B%0Ayresolution%20%3D%201080%20*%20scale%3B%0A%2F%2F%20keep%20aspect%20ratio%20by%20chopping%20shorter%20dimension...%0A%0Axcenter%20%3D%20-1%3B%0Aycenter%20%3D%200%3B%0Adelta%20%3D%203%3B%0Aytop%20%3D%20ycenter%20-%20delta%20*%20yresolution%20%2F%20xresolution%3B%0Axleft%20%3D%20xcenter%20-%20delta%3B%0Axright%20%3D%20xcenter%20%2B%20delta%3B%0Aybottom%20%3D%20ycenter%20%2B%20delta%20*%20yresolution%20%2F%20xresolution%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E4%B8%8A%E8%A8%98%E3%81%AE%E3%83%93%E3%83%83%E3%83%88%E3%81%AB%E3%81%AF%E3%80%81%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%81%A8%E3%81%84%E3%81%8F%E3%81%A4%E3%81%8B%E3%81%AE%E3%83%93%E3%83%87%E3%82%AA%20%E3%82%B5%E3%82%A4%E3%82%BA%20%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%8C%E5%90%AB%E3%81%BE%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E4%BB%A5%E4%B8%8B%E3%81%AE%E3%83%93%E3%83%83%E3%83%88%E3%81%AF%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3%83%BC%E3%82%AF%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E8%AA%AC%E6%98%8E%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E3%83%9B%E3%82%B9%E3%83%88%E3%82%AD%E3%83%BC%E3%80%81%E3%82%B5%E3%83%BC%E3%83%90%E3%83%BC%E3%80%81CPU%E3%80%81%E5%AE%9F%E8%A1%8C%E4%B8%AD%E3%80%81%E3%82%AE%E3%82%B0%E3%81%AF%E3%80%81%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%BF%E3%83%BC%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E6%83%85%E5%A0%B1%E3%81%AE%20condat%20(%E6%8E%A5%E7%B6%9A%E3%83%87%E3%83%BC%E3%82%BF)%20%E3%83%AA%E3%82%B9%E3%83%88%E3%81%B8%E3%81%AE%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20named%20indexes%20for%20condat%0Ahostkey%20%3D%201%3B%20%2F%2F%20from%20a%20failed%20connection%2C%20this%20makes%20the%20connection%20work%0Aserver%20%3D%202%3B%20%2F%2F%20the%20machine%20names%0Acpus%20%3D%203%3B%20%2F%2F%20from%20the%20lscpu%20command%2C%20below%0Arunning%20%3D%204%3B%20%2F%2F%20dynamic%3A%20how%20many%20are%20running%20on%20this%20cpu%2C%20right%20now%0Agigs%20%3D%205%3B%20%2F%2F%20from%20the%20free%20command%2C%20below%0A%0A%2F%2F%20the%20avahi-daemon%20may%20need%20to%20be%20stop%2Fstart%2Fstatus%20sometimes%2C%0A%2F%2F%20unfortunately%20that%20is%20hard%20to%20do%20except%20at%20server%20keyboard%20if%20you%20can't%20connect...%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%83%87%E3%83%BC%E3%83%A2%E3%83%B3%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%AF%E3%81%BE%E3%81%A0%E5%AD%98%E5%9C%A8%E3%81%97%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E3%83%87%E3%83%BC%E3%83%A2%E3%83%B3%E3%81%8C%20-2%20(%E3%81%AA%E3%81%A9)%20%E3%82%B5%E3%83%95%E3%82%A3%E3%83%83%E3%82%AF%E3%82%B9%E3%82%92%E4%BB%98%E3%81%91%E3%81%A6%E3%83%9E%E3%82%B7%E3%83%B3%E3%82%92%E3%82%A2%E3%83%89%E3%83%90%E3%82%BF%E3%82%A4%E3%82%BA%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%82%8F%E3%81%8B%E3%82%8A%E3%80%81%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%82%92%E6%8E%A5%E7%B6%9A%E3%81%9B%E3%81%9A%E3%81%AB%E4%BF%AE%E6%AD%A3%E3%81%A7%E3%81%8D%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Econdat%20%3D%20%7B%0A%7B%224e%3Ac3%3A8a%3A3b%3Ae7%3Ad4%3Abd%3A0d%3A85%3A62%3A36%3A40%3A17%3A15%3Ab4%3Aa3%22%2C%20%22dell790a.local%22%2C%204%2C%200%2C%2022%7D%2C%0A%7B%2200%3Ac2%3A37%3A09%3Adc%3Ad7%3Acf%3Afb%3A33%3Ae3%3A14%3Ae3%3Ad6%3Afb%3A39%3Abe%22%2C%20%22dell790b.local%22%2C%204%2C%200%2C%2014%7D%2C%0A%7B%2254%3Ac8%3A1a%3A6a%3A50%3Ae3%3A51%3A02%3Aed%3A1b%3Af8%3Afa%3Abd%3Af4%3Ae4%3A17%22%2C%20%22dell7010a.local%22%2C%208%2C%200%2C%2030%7D%2C%0A%7B%2266%3A0d%3Aca%3A3c%3A1f%3A11%3Aeb%3A45%3Ad4%3A92%3Ad0%3A0b%3Aae%3A01%3Ab8%3A6b%22%2C%20%22dell7010b.local%22%2C%208%2C%200%2C%2030%7D%2C%0A%7B%2294%3A84%3A2f%3Aa5%3A56%3A2d%3Adb%3A16%3Ab5%3A80%3Aa9%3A0d%3A87%3A07%3Aee%3A53%22%2C%20%22dell9010.local%22%2C%208%2C%200%2C%2030%7D%2C%0A%7B%22b2%3Ab7%3Ab3%3Ac3%3A83%3A63%3A11%3Ae7%3A56%3Ae7%3Ac9%3Ac2%3Ae6%3Afc%3Af0%3Ac9%22%2C%20%22thinkb.local%22%2C%208%2C%200%2C%2030%7D%2C%0A%7B%222b%3Aca%3Afc%3A45%3Af0%3A64%3Acd%3Aac%3A70%3Ace%3A93%3A73%3Ae8%3A84%3A2d%3A75%22%2C%20%22thinkc.local%22%2C%208%2C%200%2C%2030%7D%2C%0A%7B%2262%3Ab7%3A67%3A23%3A8d%3A86%3Afe%3A80%3A1a%3A62%3Aec%3Ad8%3A41%3A1b%3Ab4%3A1b%22%2C%20%22thinkd.local%22%2C%208%2C%200%2C%2030%7D%2C%0A%7B%228e%3A54%3Aee%3Ab0%3A25%3A67%3Ab8%3A5c%3A4d%3Aad%3A5e%3Ae9%3A71%3A87%3Afd%3A71%22%2C%20%22netflix.local%22%2C%202%2C%200%2C%2030%7D%20%2F%2F%20host%20for%20vm%0A%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E4%BB%A5%E4%B8%8B%E3%81%AE%20JSL%20%E3%81%AF%20condat%20%E3%83%AA%E3%82%B9%E3%83%88%E3%82%92%E8%AA%BF%E3%81%B9%E3%81%A6%E3%80%81dell9010%20%E3%81%AE%E3%82%88%E3%81%86%E3%81%AA%E5%90%8D%E5%89%8D%E3%82%92%E3%83%89%E3%83%83%E3%83%88%E4%BB%98%E3%81%8D%20IP%20%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%20(%E3%81%BE%E3%81%9F%E3%81%AF%20IPV6%20%E7%9B%B8%E5%BD%93)%20%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%82%8C%E3%81%AB%E3%82%88%E3%82%8A%E3%80%81%E5%BE%8C%E3%81%A7%E6%A4%9C%E7%B4%A2%E3%81%8C%E5%A4%B1%E6%95%97%E3%81%99%E3%82%8B%E3%81%AE%E3%82%92%E9%98%B2%E3%81%8E%E3%81%BE%E3%81%99%E3%80%82%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%BF%E3%83%BC%E3%81%AF%E7%B4%84%203%20%E6%97%A5%E9%96%93%E5%AE%9F%E8%A1%8C%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E5%A6%BB%E3%81%AE%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97%E3%81%8C%20DNS%20%E3%83%AB%E3%83%83%E3%82%AF%E3%82%A2%E3%83%83%E3%83%97%20%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%82%92%E6%8F%90%E4%BE%9B%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E7%90%86%E7%94%B1%E3%81%8C%E3%81%BE%E3%81%A0%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E2%80%A6GetAddrInfo%20%E3%82%92%E8%A6%9A%E3%81%88%E3%82%8B%E5%89%8D%E3%81%AF%E3%80%81%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E4%BB%98%E3%81%8D%E3%81%AE%20ping%20%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E3%81%93%E3%82%8C%E3%81%AF%E5%B0%91%E3%81%97%E4%B8%8D%E6%A0%BC%E5%A5%BD%E3%81%A7%E3%81%99%E3%80%82%20%E7%A7%81%E3%81%AE%E5%AE%B6%E3%81%AF%E3%80%81%E6%95%B0%E5%B9%B4%E5%89%8D%E3%81%AB%E6%AF%94%E3%81%B9%E3%81%A6%E3%80%81%E4%BB%8A%E3%81%A7%E3%81%AF%20IPV6%20%E3%81%AB%E3%81%A8%E3%81%A6%E3%82%82%E6%BA%80%E8%B6%B3%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20IPV6%20%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%8C%E8%A7%92%E6%8B%AC%E5%BC%A7%E5%86%85%E3%81%AB%E5%90%AB%E3%81%BE%E3%82%8C%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20on%20my%20local%20network%2C%20the%20lookups%20for%20xxx.local%20fail%20randomly%2C%0A%2F%2F%20and%20more%20often%20when%20busy.%20pre-lookup%20the%20dotted%20ip%20now.%0A%2F%2F%0A%2F%2F%20better%20way%3F%20Get%20Addr%20Info(%20%22thinkd.local%22%20)%5B3%5D%5B4%5D%0A%2F%2F%0Afor(%20itry%20%3D%201%2C%20itry%20%26lt%3B%2010%2C%20itry%20%2B%3D%201%2C%0A%20nprocs%20%3D%200%3B%0A%20MAXCPU%20%3D%200%3B%0A%20good%20%3D%200%3B%0A%20for(%20iCondat%20%3D%201%2C%20iCondat%20%26lt%3B%3D%20N%20Items(%20condat%20)%2C%20iCondat%20%2B%3D%201%2C%0A%20%20nprocs%20%2B%3D%20condat%5BiCondat%5D%5Bcpus%5D%3B%20%2F%2F%20nprocs%20will%20divide%20up%20the%20work%20(stepsize)%0A%20%20condat%5BiCondat%5D%5Brunning%5D%20%3D%200%3B%0A%20%20MAXCPU%20%3D%20Max(%20MAXCPU%2C%20condat%5BiCondat%5D%5Bcpus%5D%20)%3B%20%2F%2F%20MAXCPU%20loops%20needed%20later%0A%20%20if(%20Starts%20With(%20condat%5BiCondat%5D%5Bserver%5D%2C%20%22%5B%22%20)%2C%0A%20%20%20good%20%2B%3D%201%2C%20%2F%2F%20else%0A%20%20%20%2F%2F%20%20%20txt%20%3D%20Run%20Program(%0A%20%20%20%2F%2F%20%20%20%20Executable(%20%22PING.EXE%22%2F*path%20probably%20not%20needed*%2F%20)%2C%0A%20%20%20%2F%2F%20%20%20%20Options(%20%7B%22-n%201%22%2C%20condat%5BiCondat%5D%5Bserver%5D%7D%20)%2C%0A%20%20%20%2F%2F%20%20%20%20ReadFunction(%20%22text%22%20)%0A%20%20%20%2F%2F%20%20%20)%3B%0A%20%20%20%2F%2F%20%20%20ip%20%3D%20Regex(%20txt%2C%20%22%5C%5B%5C%5B(%5B%5E%5D%5D%2B)%5C%5D%5D%5C%22%2C%20%22%5C0%22%20)%3B%20%2F%2F%20typ%3A%20%5B2603%3A6081%3A1a02%3A1200%3A8973%3Ae7be%3A605c%3Af753%5D%0A%20%20%20try(%0A%20%20%20ip%20%3D%20%22%5B%22%20%7C%7C%20Get%20Addr%20Info(%20condat%5BiCondat%5D%5Bserver%5D%20)%5B3%5D%5B4%5D%20%7C%7C%20%22%5D%22%3B%0A%20%20%20%20if(%20!Is%20Missing(%20ip%20)%2C%0A%20%20%20%20%20Write(%20%22%5C!n%22%2C%20condat%5BiCondat%5D%5Bserver%5D%20%7C%7C%20%22%20--%26gt%3B%20%22%20%7C%7C%20ip%20)%3B%0A%20%20%20%20%20condat%5BiCondat%5D%5Bserver%5D%20%3D%20ip%3B%0A%20%20%20%20%20good%20%2B%3D%201%3B%0A%20%20%20%20%2C%20%2F%2F%0A%20%20%20%20%20Write(%20%22%5C!n%22%2C%20condat%5BiCondat%5D%5Bserver%5D%20%7C%7C%20%22%20lookup%20failed%20%22%2C%20Left(%20txt%2C%2070%20)%20)%0A%20%20%20%20)%3B%20%2F%2F%0A%20%20%20%2C%20%2F%2F%20catch%0A%20%20%20%20show(exception_msg%2CiCondat%2Ccondat%5BiCondat%5D%5Bserver%5D%2CGet%20Addr%20Info(%20condat%5BiCondat%5D%5Bserver%5D%20))%3B%0A%20%20%20)%3B%0A%20%20)%3B%0A%20)%3B%0A%20if(%20good%20%3D%3D%20N%20Items(%20condat%20)%2C%0A%20%20Break()%2C%0A%20%20Wait(%20.1%20)%0A%20)%3B%0A)%3B%0AWrite(%20%22%5C!n%22%2Cgood%2C%22%20of%20%22%2C%20N%20Items(%20condat%20)%2C%22%20names%20resolved.%22%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E6%AC%A1%E3%81%AE%E9%83%A8%E5%88%86%E3%81%AF%E8%B3%87%E6%A0%BC%E6%83%85%E5%A0%B1%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E3%82%82%E3%81%AE%E3%81%A7%E3%81%99%E3%80%82ppk%20%E3%81%AF%20JMP%20%E3%83%9E%E3%82%B7%E3%83%B3%E3%81%AE%E7%A7%98%E5%AF%86%E9%8D%B5%E3%81%A7%E3%81%99%E3%80%82%20%E3%81%9D%E3%81%AE%E3%82%AD%E3%83%BC%E3%81%AE%E5%85%AC%E9%96%8B%E9%83%A8%E5%88%86%E3%81%AF%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%BF%E3%83%BC%E5%86%85%E3%81%AE%E5%90%84%E3%83%9E%E3%82%B7%E3%83%B3%E4%B8%8A%E3%81%AB%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20Plink%20%E3%81%AF%E3%80%81%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%88%20%E3%83%9E%E3%82%B7%E3%83%B3%E3%81%B8%E3%81%AE%20SSH%20%E6%8E%A5%E7%B6%9A%E3%81%AB%E7%BD%B2%E5%90%8D%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E3%81%9D%E3%81%AE%E3%83%97%E3%83%A9%E3%82%A4%E3%83%99%E3%83%BC%E3%83%88%20%E3%83%93%E3%83%83%E3%83%88%E3%82%92%E5%BF%85%E8%A6%81%E3%81%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20if(0)%20%E3%82%B3%E3%83%BC%E3%83%89%E3%81%8C%E3%81%82%E3%82%8B%E3%81%AE%E3%81%A7%E3%80%81%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E3%83%9E%E3%82%B7%E3%83%B3%E3%81%A7%E5%AE%9F%E9%A8%93%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%20%E4%B8%80%E6%97%A5%E3%81%AE%E7%B5%82%E3%82%8F%E3%82%8A%E3%81%AB%E3%81%AF%E3%80%81%E5%85%A8%E5%93%A1%E3%81%AB%E3%82%B7%E3%83%A3%E3%83%83%E3%83%88%E3%83%80%E3%82%A6%E3%83%B3%20%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%82%92%E9%80%81%E4%BF%A1%E3%81%99%E3%82%8B%E3%81%8B%E3%82%82%E3%81%97%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%20condat%20%E3%83%AA%E3%82%B9%E3%83%88%E3%81%AB%E3%80%81%E3%81%93%E3%81%AE%20JSL%20%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%20VirtualBox%20%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%20Linux%20%E3%83%9E%E3%82%B7%E3%83%B3%E3%81%8C%E5%90%AB%E3%81%BE%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AF%E3%80%81shutdown%20%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%AB%E6%B3%A8%E6%84%8F%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%20(%E4%B8%8A%E8%A8%98%E3%81%AE%E8%A1%8C%209)%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eremoteuser%20%3D%20%22c%40%22%3B%0Alocalkey%20%3D%20%22%20-i%20c%3A%5CUsers%5Cv1%5CDesktop%5Ckeys%5Cprivate.ppk%20%22%3B%0A%0A%2F%2F%20test%20code%20examples...%0Aif(%200%2C%20%2F%2F%20sequential%20test%20using%20command%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22python3.6%20-m%20pip%20install%20numpy%22%3B%20%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22python3.6%20-m%20pip%20--version%22%3B%20%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22python3.6%20-m%20pip%20install%20-U%20pip%22%3B%20%0A%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22python3.6%20--version%22%3B%20%0A%20command%20%3D%20%22%20%5C!%22hostname%20-A%22%3B%20%0A%20command%20%3D%20%22%20%5C!%22top%20-b%20-n%202%7Chead%20-n%2015%22%3B%20%0A%0A%20%2F%2F%20check%20if%20the%20common%20nfs%20mount%20is%20set%20up%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22ls%20%2Fmnt%2Fnfsc%22%3B%20%2F%2F%20fstab%3A%20closet.local%3A%2Fmnt%2Fnfs%20%2Fmnt%2Fnfsc%2F%20nfs%20defaults%200%200%0A%0A%20%2F%2F%20cycle%20the%20power%3B%20-r%20means%20restart.%20for%20this%20to%20work%2C%20must%20be%20sudo%20and%20not%20need%20password%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22sudo%20shutdown%20-r%20now%22%3B%20%2F%2F%20visudo%3A%20c%20ALL%3D(ALL)%20NOPASSWD%3A%20%2Fsbin%2Fpoweroff%2C%20%2Fsbin%2Freboot%2C%20%2Fsbin%2Fshutdown%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22sudo%20shutdown%20%20now%22%3B%20%2F%2F%20visudo%3A%20c%20ALL%3D(ALL)%20NOPASSWD%3A%20%2Fsbin%2Fpoweroff%2C%20%2Fsbin%2Freboot%2C%20%2Fsbin%2Fshutdown%0A%0A%20%2F%2F%20info%20about%20number%20of%20cores%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22lscpu%20%7C%20egrep%20'%5E(Model%20name%7CThread%7CCPU%5C(s%5C)%3A)'%22%3B%0A%0A%20%2F%2F%20info%20about%20memory%0A%20%2F%2Fcommand%20%3D%20%22%20%5C!%22free%20-h%22%3B%0A%0A%20for(%20iCondat%20%3D%201%2C%20iCondat%20%26lt%3B%3D%20N%20Items(%20condat%20)%2C%20iCondat%20%2B%3D%201%2C%0A%20%20result%20%3D%20runprogram(%0A%20%20%20executable(%20%22plink%22%20)%2C%0A%20%20%20options(%0A%20%20%20%20localkey%20%7C%7C%20%0A%20%2F**%2F%20%20%20%20%22%20-hostkey%20%22%20%7C%7C%20condat%5BiCondat%5D%5Bhostkey%5D%20%7C%7C%20%2F*%20this%20line%20hides%20the%20host%20key%20*%2F%0A%20%20%20%20%22%20%22%20%7C%7C%20remoteuser%20%7C%7C%20condat%5BiCondat%5D%5Bserver%5D%20%7C%7C%20command%0A%20%20%20)%2C%0A%20%20%20write%20function(%20Function(%20%7Bthis%7D%2C%20this%20%26lt%3B%26lt%3B%20Write(%20%22n%5Cr%5Cn%22%20)%20)%20)%2C%0A%20%20%20readfunction(%20%22blob%22%20)%0A%20%20)%3B%0A%20%20result%20%3D%20Regex(%20Blob%20To%20Char(%20result%20)%2C%20%22(%5Cr%5Cn)%2B%22%2C%20%22%5Cr%5Cn%22%2C%20GLOBALREPLACE%20)%3B%0A%20%20Write(%20%22%5C!n%5C!n%22%2C%20iCondat%2C%20%22%20%22%2C%20condat%5BiCondat%5D%5Bserver%5D%2C%20%22%20%22%2C%20result%20)%3B%0A%20%20Wait(%200%20)%3B%0A%20)%3B%0A%20Write(%20%22%5C!n%5C!ntest%20done%22%20)%3B%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E6%AC%A1%E3%81%AE%E9%83%A8%E5%88%86%E3%81%AF%E3%80%81RunProgram%20%E3%81%AE%E5%A4%9A%E6%95%B0%E3%81%AE%E3%82%B3%E3%83%94%E3%83%BC%E3%82%92%E5%90%8C%E6%99%82%E3%81%AB%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E3%81%A7%E3%81%99%E3%80%82%20ImgNum%20%E3%81%AF%E3%81%93%E3%82%8C%E3%82%89%E3%81%AE%E5%90%84%E9%80%A3%E6%83%B3%E9%85%8D%E5%88%97%E3%81%AE%E3%82%AD%E3%83%BC%E3%81%A7%E3%81%82%E3%82%8A%E3%80%81Python%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%8C%E5%87%A6%E7%90%86%E3%81%99%E3%82%8B%E7%94%BB%E5%83%8F%E3%81%AE%E7%95%AA%E5%8F%B7%E3%81%A7%E3%81%99%E3%80%82%20ImgNumToRP%20%E3%81%AF%E3%80%81%E5%AE%9F%E8%A1%8C%E4%B8%AD%E3%81%AE%20RunProgram%20%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%92%E4%BF%9D%E6%8C%81%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%9D%E3%81%AE%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AF%E7%B5%82%E4%BA%86%E6%99%82%E3%81%AB%20imgNumToRPdone%20%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20imgNumToResult%20%E3%81%AF%20Python%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E5%87%BA%E5%8A%9B%E3%82%92%E4%BF%9D%E6%8C%81%E3%81%97%E3%80%81imgNumToMachine%20%E3%81%AF%E3%83%9E%E3%82%B7%E3%83%B3%E3%81%AE%20ID%E3%80%81imgNumToLabel%20%E3%81%AF%E7%94%BB%E5%83%8F%E3%81%AE%E3%83%A9%E3%83%99%E3%83%AB%E3%82%92%E4%BF%9D%E6%8C%81%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20(%E3%83%A9%E3%83%99%E3%83%AB%E3%81%AF%E5%BE%8C%E3%81%A7%E9%81%A9%E7%94%A8%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E8%A9%B3%E7%B4%B0%E3%81%AF%E4%BB%A5%E4%B8%8B%E3%81%A7%E8%AA%AC%E6%98%8E%E3%81%97%E3%81%BE%E3%81%99%E3%80%82)%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EimgNumToRP%20%3D%20%5B%3D%26gt%3B%20%5D%3B%20%20%2F%2F%20holder%20for%20active%20RunProgram%20objects%0AimgNumToRPdone%20%3D%20%5B%3D%26gt%3B%20%5D%3B%20%2F%2F%20holder%20for%20RunProgram%20objects%20that%20need%20a%20moment%20to%20terminate%0AimgNumToRPresult%20%3D%20%5B%3D%26gt%3B%20%22%22%5D%3B%20%2F%2F%20result%20strings%20from%20RunProgram%20objects%0AimgNumToMachine%20%3D%20%5B%3D%26gt%3B%200%5D%3B%20%2F%2F%20which%20machine%20is%20this%20running%20on%3F%0AimgNumToLabel%20%3D%20%5B%3D%26gt%3B%22%22%5D%3B%20%2F%2F%20f(x)%20labels%20for%20graphs%0A%0AnextImageNumberToMakePicture%20%3D%200%3B%0A%2F%2F%20also%3A%20keep%20track%20of%20zeros%20from%20previous%20image%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Eunstick%20%E9%96%A2%E6%95%B0%E3%81%AF%E3%80%81RunProgram%20%E3%81%AE%E7%B5%82%E4%BA%86%E5%BE%8C%E3%81%AB%E6%9C%80%E5%BE%8C%E3%81%AB%20ReadFunction%20%E3%82%92%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%95%E3%81%AA%E3%81%84%20RunProgram%20%E3%82%92%E5%87%A6%E7%90%86%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eunstick%20%3D%20function(%7B%7D%2C%7Bimagenumber%7D%2C%0A%20for(%20imagenumber%20%3D%20imgNumToRP%20%26lt%3B%26lt%3B%20first%2C%20!Is%20Empty(%20imagenumber%20)%2C%20imagenumber%20%3D%20imgNumToRPnext%2C%0A%20%20imgNumToRPnext%20%3D%20imgNumToRP%20%26lt%3B%26lt%3B%20next(%20imagenumber%20)%3B%0A%20%20if(%20(imgNumToRP%5Bimagenumber%5D)%20%26lt%3B%26lt%3B%20canread%20%3D%3D%200%20%26amp%3B%20(imgNumToRP%5Bimagenumber%5D)%20%26lt%3B%26lt%3B%20canwrite%20%3D%3D%200%20%26amp%3B%20(imgNumToRP%5Bimagenumber%5D)%20%26lt%3B%26lt%3B%20isreadeof%20%3D%3D%201%2C%0A%20%20%20imgNumToRPresult%5Bimagenumber%5D%20%3D%20%22%5C!n%22%20%7C%7C%20char(imagenumber)%20%7C%7C%20%22%3A%20%22%20%7C%7C%20imgNumToRPresult%5Bimagenumber%5D%20%7C%7C%20%22%5C!n%22%3B%20%20%2F%2F%20NoInterleave%20save%20this%20with%20count%20and%20basin%0A%20%20%20imgNumToRPdone%5Bimagenumber%5D%20%3D%20imgNumToRP%5Bimagenumber%5D%3B%0A%20%20%20imgNumToRP%20%26lt%3B%26lt%3B%20removeitem(%20imagenumber%20)%3B%0A%20%20%20%2F%2Fif(imgNumToMachine%5Bimagenumber%5D!%3Dmachine%2Cthrow(%22b%20machine%20not%20match%22%7C%7Cchar(machine)%7C%7C%22%2C%22%7C%7Cchar(imgNumToMachine%5Bimagenumber%5D)))%3B%0A%20%20%20condat%5BimgNumToMachine%5Bimagenumber%5D%5D%5Brunning%5D%20%3D%20condat%5BimgNumToMachine%5Bimagenumber%5D%5D%5Brunning%5D%20-%201%3B%0A%20%20%20imgNumToMachine%5Bimagenumber%5D%20%3D%200%3B%0A%20%20%20try(%0A%20%20%20%20write(%22%5C!nunsticking%20%22%2Cimagenumber)%3B%0A%20%20%20%20process(%20imagenumber%20)%3B%20%2F%2F%20must%20be%20after...%0A%20%20%20%2C%0A%20%20%20%20show(exception_msg)%3B%0A%20%20%20)%3B%0A%20%20%20Break()%3B%20%2F%2F%20restart%20with%20%26lt%3B%3CFIRST%3E%3C%2FFIRST%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E4%BB%A5%E4%B8%8B%E3%81%AE%20findmachine%20%E9%96%A2%E6%95%B0%E3%81%AF%E3%80%81%E9%96%8B%E5%A7%8B%E3%81%95%E3%82%8C%E3%81%9F%20SSH%20%E3%82%BB%E3%83%83%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%8C%E5%A4%9A%E3%81%99%E3%81%8E%E3%81%AA%E3%81%84%E3%83%9E%E3%82%B7%E3%83%B3%E3%82%92%E6%A4%9C%E7%B4%A2%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20unstick()%20%E9%96%A2%E6%95%B0%E3%81%AF%E3%80%81%E3%82%B9%E3%82%BF%E3%83%83%E3%82%AF%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%2010%25%20%E3%81%AE%E3%82%B1%E3%83%BC%E3%82%B9%E3%82%92%E6%8E%A2%E3%81%99%E3%81%9F%E3%82%81%E3%81%AB%E5%AE%9A%E6%9C%9F%E7%9A%84%E3%81%AB%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EfindMachine%20%3D%20function(%20%7B%7D%2C%7BiCondat%2Cn%7D%2C%20%2F%2F%20find%20a%20machine%20that%20is%20not%20filled%20up%0A%20n%3D0%3B%0A%20while(%201%2C%0A%20%20for(%20iCondat%20%3D%201%2C%20iCondat%20%26lt%3B%3D%20N%20Items(%20condat%20)%2C%20iCondat%20%2B%3D%201%2C%0A%20%20%20if(%20condat%5BiCondat%5D%5Brunning%5D%20%26lt%3B%20condat%5BiCondat%5D%5Bcpus%5D%2C%0A%20%20%20%20Return(%20iCondat%20)%0A%20%20%20)%0A%20%20)%3B%0A%20%20if(mod(n%2B%3D1%2C60)%3D%3D0%2C%0A%20%20%20write(%22wait%20for%20machine...%22)%3B%0A%20%20%20%2F%2F%20look%20for%20stuck%0A%20%20%20unstick()%3B%20%20%20%20%0A%20%20)%3B%0A%20%20Wait(%201%20)%3B%20%2F%2F%20a%20full%20second%20is%20fine%3B%20the%20processes%20run%20for%2010s%20of%20seconds%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Eprocess%20%E9%96%A2%E6%95%B0%E3%81%AF%E3%80%81JMP%20%E3%81%8C%20RunProgram%20%E3%81%AE%E7%B5%82%E4%BA%86%E3%82%92%E6%A4%9C%E5%87%BA%E3%81%97%E3%81%9F%E3%81%A8%E3%81%8D%E3%81%AB%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20Python%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AF%E5%87%BA%E5%8A%9B%E3%81%AE%E6%9C%80%E5%BE%8C%E3%81%AB%E3%80%8C%E3%82%BB%E3%83%B3%E3%83%81%E3%83%8D%E3%83%AB%E3%80%8D%E3%82%92%E6%9B%B8%E3%81%8D%E8%BE%BC%E3%81%BF%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AF%E3%80%81%E3%81%99%E3%81%B9%E3%81%A6%E3%81%8C%E3%82%B9%E3%83%A0%E3%83%BC%E3%82%BA%E3%81%AB%E5%AE%9F%E8%A1%8C%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E3%81%8B%E3%81%A9%E3%81%86%E3%81%8B%E3%81%AE%E5%A4%A7%E3%81%BE%E3%81%8B%E3%81%AA%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%A8%E3%81%97%E3%81%A6%E3%81%9D%E3%82%8C%E3%82%92%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20bindata%20%E3%81%AF%E3%80%81Python%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%8C%20NFS%20%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E4%B8%8A%E3%81%AE%E3%83%95%E3%82%A1%E3%83%BC%E3%83%A0%20%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E7%94%9F%E6%88%90%E3%81%99%E3%82%8B%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%A7%E3%81%99%E3%80%82%20Windows%20%E3%81%A8%20JMP%20%E3%81%AF%E3%80%81NFS%20%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%82%92%20%5C%5CVBOXSVR%20%E3%83%91%E3%82%B9%E3%81%A7%E8%AA%8D%E8%AD%98%E3%81%97%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81Linux%20%E3%81%A8%20Python%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AF%E3%80%81%2F%2Fmnt%20%E3%83%91%E3%82%B9%E3%81%A7%20NFS%20%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%82%92%E8%AA%8D%E8%AD%98%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%93%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AF%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%20%E3%83%87%E3%83%BC%E3%82%BF%E3%81%8B%E3%82%89%E7%94%BB%E5%83%8F%E3%82%92%E7%94%9F%E6%88%90%E3%81%99%E3%82%8B%E4%BA%88%E5%AE%9A%E3%81%A7%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E3%81%9D%E3%82%8C%E3%81%AF%E5%BE%8C%E5%87%A6%E7%90%86%E3%82%B9%E3%83%86%E3%83%83%E3%83%97%E3%81%AB%E5%88%86%E5%89%B2%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%20%E7%8F%BE%E5%9C%A8%E3%81%AF%E3%80%81%E6%95%B0%E5%BC%8F%E3%81%A7%E6%A4%9C%E5%87%BA%E3%81%95%E3%82%8C%E3%81%9F%E3%82%BC%E3%83%AD%E3%81%AE%E6%95%B0%E3%82%92%E5%A0%B1%E5%91%8A%E3%81%99%E3%82%8B%E3%81%A0%E3%81%91%E3%81%A7%E3%81%99%E3%80%82%20%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%E5%BD%A2%E5%BC%8F%E3%81%AF%20Python%20%E3%82%B3%E3%83%BC%E3%83%89%E3%81%A7%E8%AA%AC%E6%98%8E%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20JMP%20%E3%81%AF%E3%81%9D%E3%82%8C%E3%82%92%E8%AA%AD%E3%81%BF%E5%8F%96%E3%82%8A%E3%80%81%E3%81%93%E3%81%93%E3%81%A7%202%20%E5%9B%9E%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%20blobtomatrix%20%E3%82%92%E3%83%AD%E3%83%BC%E3%83%89%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%82%92%E5%A4%96%E3%81%97%E3%81%A6%E5%BF%85%E8%A6%81%E3%81%A7%E3%81%82%E3%82%8C%E3%81%B0%E3%80%81%E6%9C%80%E5%BE%8C%E3%81%AE%E5%86%8D%E8%B5%B7%E5%8B%95%E3%81%AF%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%82%92%E5%A4%96%E3%81%99%E3%81%AE%E3%82%92%E5%BF%98%E3%82%8C%E3%81%A6%E3%81%84%E3%81%9F%E3%81%AE%E3%81%A7%E5%BF%85%E8%A6%81%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20process%20output%20from%20one%20thread%20in%20the%20farm%0Aprocess%20%3D%20function(%20%7Bimagenumber%7D%2C%0A%20%7Bbindata%2C%20start%2C%20stop%2C%20balanceBytes%2C%20matdata%2C%20countArray%2CbasinArray%2Czeros%7D%2C%20%0A%20%2F%2Fshow(%22process%22%2Cimagenumber)%3B%0A%20if(%20Contains(%20imgNumToRPresult%5Bimagenumber%5D%2C%20%22sentinel%22%20)%2C%20%0A%20%20%2F%2F%20process%20a%20file.%20maybe%20not%20this%20one%20if%20it%20is%20out%20of%20order...%20FIXME...nextImageNumberToMakePicture%0A%20%20bindata%20%3D%20Load%20Text%20File(%20%22%5C%5CVBOXSVR%5Cnfsc%5Cfarm%5Cbinary%22%20%7C%7C%20char(imagenumber)%20%7C%7C%20%22.generated%22%2C%20blob()%20)%3B%0A%20%20matdata%20%3D%20blobtomatrix(%0A%20%20%20bindata%2C%0A%20%20%20%22uint%22%2C%0A%20%20%202%2C%0A%20%20%20%22little%22%2C%0A%20%20%202%0A%20%20)%3B%0A%20%20%0A%20%20countArray%20%3D%20J(%20yresolution%2C%20xresolution%2C%200%20)%3B%0A%20%20basinArray%20%3D%20J(%20yresolution%2C%20xresolution%2C%200%20)%3B%0A%0A%20%20countArray%5B0%5D%20%3D%20matdata%5B1%3A%3Anrows(countArray)*ncols(countArray)%2C%201%5D%3B%0A%20%20basinArray%5B0%5D%20%3D%20matdata%5B1%3A%3Anrows(countArray)*ncols(countArray)%2C%202%5D%3B%20%0A%20%20balanceBytes%20%3D%20length(bindata)%20-%204*nrows(countArray)*ncols(countArray)%3B%0A%20%20zeros%20%3D%20blobtomatrix(blobpeek(bindata%2Clength(bindata)-balanceBytes)%2C%22float%22%2C8%2C%22little%22%2C4)%3B%0A%20%20write(%22%5C!nimagenumber%3D%22%2Cimagenumber%2C%20if(!ismatrix(zeros)%2C%22%20zeros%20***%22%2C%22%20zeros%3D%22%7C%7Cchar(nrows(zeros))))%3B%0A%20%20deletefile(%22%5C%5CVBOXSVR%5Cnfsc%5Cfarm%5Ctestpython%22%7C%7Cchar(imagenumber)%7C%7C%22.py%22)%3B%20%2F%2F%20source%20no%20longer%20needed%0A%20%20sentinels%20%2B%3D%201%3B%2F%2F%0A%20%2C%20%2F%2F%20else%0A%20%20Write(%20imgNumToRPresult%5Bimagenumber%5D%20)%3B%0A%20%20Write(%20%22%5C!nrelaunch%20disabled%22%20%7C%7C%20char(imagenumber)%20)%3B%0A%20%20%2F%2Flaunch(%20imagenumber%20)%3B%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Elaunch%20%E9%96%A2%E6%95%B0%E3%81%AF%E5%88%A5%E3%81%AE%20RunProgram%20%E3%82%92%E9%96%8B%E5%A7%8B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20findmachine%20%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E5%88%A9%E7%94%A8%E5%8F%AF%E8%83%BD%E3%81%AA%E3%83%9E%E3%82%B7%E3%83%B3%E3%82%92%E5%BE%85%E3%81%A1%E3%80%81%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%20.py%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%A8%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%20%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%82%92%20Python%20%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%AB%E6%8F%90%E4%BE%9B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20.py%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AF%E3%81%95%E3%82%89%E3%81%AB%E4%B8%8B%E3%81%AB%E4%BD%9C%E6%88%90%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E4%BB%A5%E4%B8%8B%E3%81%AE%205%20%E8%A1%8C%E7%9B%AE%E3%81%AE%E3%82%B9%E3%83%AD%E3%83%BC%E3%81%AF%E5%81%A5%E5%85%A8%E6%80%A7%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%81%A7%E3%81%99%E3%80%82%20JSL%20%E3%81%AF%E9%9D%9E%E5%B8%B8%E3%81%AB%E8%A4%87%E9%9B%91%E3%81%AA%E3%81%AE%E3%81%A7%E3%80%81%E3%83%AD%E3%82%B8%E3%83%83%E3%82%AF%20%E3%82%A8%E3%83%A9%E3%83%BC%E3%82%92%E7%9B%A3%E8%A6%96%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E8%A8%98%E8%BF%B0%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8B%E3%81%A8%E6%84%9F%E3%81%98%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2F%20launch%20a%20thread%20in%20the%20farm%0Alaunch%20%3D%20function(%20%7Bimagenumber%7D%2C%7Bcommand%2Cmachine%7D%2C%0A%20machine%20%3D%20findMachine()%3B%0A%20%2F%2Fshow(%22launch%22%2Cimagenumber%2Cmachine)%3B%0A%20if(imgNumToMachine%5Bimagenumber%5D!%3D0%2Cthrow(%22image%20number%20already%20on%20machine%22%7C%7Cchar(imagenumber)%7C%7C%22%2C%22%7C%7Cchar(machine)))%3B%0A%20imgNumToMachine%5Bimagenumber%5D%20%3D%20machine%3B%0A%20condat%5Bmachine%5D%5Brunning%5D%20%3D%20condat%5Bmachine%5D%5Brunning%5D%20%2B%201%3B%0A%20%2F%2Fcommand%20%3D%20%22%5C%5Bpython3%20%2Fmnt%2Fnfsc%2Ffarm%2Ftestpython%5D%5C%22%7C%7Cchar(imagenumber)%7C%7C%22%5C%5B.py%5D%5C%22%3B%0A%20command%20%3D%20%22%5C%5Bhostname%20-A%3Bpython3%20%2Fmnt%2Fnfsc%2Ffarm%2Ftestpython%5D%5C%22%7C%7Cchar(imagenumber)%7C%7C%22%5C%5B.py%5D%5C%22%3B%0A%20imgNumToRP%5Bimagenumber%5D%20%3D%20runprogram(%0A%20%20executable(%20%22plink%22%20)%2C%0A%20%20options(%0A%20%20%20localkey%20%7C%7C%20%2F*%20-v%20*%2F%20%22%20-hostkey%20%22%20%7C%7C%20condat%5Bmachine%5D%5Bhostkey%5D%20%7C%7C%20%22%20%22%20%7C%7C%20remoteuser%20%7C%7C%20condat%5Bmachine%5D%5Bserver%5D%20%7C%7C%20%22%20%22%20%7C%7C%20command%20%7C%7C%20%2F%2F%20%0A%20%20%20%22%20-o%20%22%20%7C%7C%20Char(%200%20)%20%7C%7C%20%2F%2F%20offset%0A%20%20%20%22%20-s%20%22%20%7C%7C%20Char(%201%20)%20%7C%7C%20%2F%2F%20step%0A%20%20%20%22%20-x%20%22%20%7C%7C%20Char(%20xresolution%20)%20%7C%7C%20%2F%2F%0A%20%20%20%22%20-y%20%22%20%7C%7C%20Char(%20yresolution%20)%20%7C%7C%20%2F%2F%0A%20%20%20%22%20-t%20%22%20%7C%7C%20Char(%20ytop%20)%20%7C%7C%20%2F%2F%0A%20%20%20%22%20-l%20%22%20%7C%7C%20Char(%20xleft%20)%20%7C%7C%20%2F%2F%0A%20%20%20%22%20-r%20%22%20%7C%7C%20Char(%20xright%20)%20%7C%7C%20%2F%2F%0A%20%20%20%22%20-b%20%22%20%7C%7C%20Char(%20ybottom%20)%20%7C%7C%20%2F%2F%0A%20%20%20%22%20-f%20%22%20%7C%7C%20%22%2Fmnt%2Fnfsc%2Ffarm%2Fbinary%22%20%7C%7C%20char(imagenumber)%20%7C%7C%20%22.generated%22%20%7C%7C%20%2F%2F%0A%20%20%20%22%22%0A%20%20)%2C%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%20%E3%82%AD%E3%83%BC%E3%83%AF%E3%83%BC%E3%83%89%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E3%81%9D%E3%81%AE%E5%BC%95%E6%95%B0%E3%82%92%E8%AA%AD%E3%81%BF%E5%8F%96%E3%82%8A%E9%96%A2%E6%95%B0%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%A7%E3%81%8D%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%93%E3%82%8C%E3%81%AF%E3%80%81%E8%A4%87%E6%95%B0%E3%81%AE%20RunProgram%20%E3%82%92%E4%B8%A6%E8%A1%8C%E3%81%97%E3%81%A6%E5%AE%9F%E8%A1%8C%E3%81%97%E3%80%81%E8%AA%AD%E3%81%BF%E5%8F%96%E3%82%8A%E9%96%A2%E6%95%B0%E3%81%AB%E3%81%9D%E3%82%8C%E3%82%89%E3%81%8C%E3%81%A9%E3%82%8C%E3%81%A7%E3%81%82%E3%82%8B%E3%81%8B%E3%82%92%E8%AA%8D%E8%AD%98%E3%81%95%E3%81%9B%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20Parameter(%20evallist(%7Bimagenumber%2Cmachine%7D)%20)%2C%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Eread%20%E9%96%A2%E6%95%B0%E3%81%AF%E5%87%BA%E5%8A%9B%E3%82%92%E3%82%AD%E3%83%A3%E3%83%97%E3%83%81%E3%83%A3%E3%81%97%E3%80%81RunProgram%20%E3%81%8C%E7%B5%82%E4%BA%86%E3%81%97%E3%81%9F%E3%81%93%E3%81%A8%E3%82%92%E6%A4%9C%E5%87%BA%E3%81%97%E3%82%88%E3%81%86%E3%81%A8%E3%81%97%E3%81%BE%E3%81%99%20(%E7%B4%84%2090%25%20%E3%81%AE%E7%A2%BA%E7%8E%87%E3%81%A7%E6%88%90%E5%8A%9F%E3%81%97%E3%81%BE%E3%81%99)%E3%80%82%20%E3%81%93%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E5%AE%9F%E8%A1%8C%E6%99%82%E3%80%81RunProgram%20%E3%81%AF%E3%81%BE%E3%81%A0%E7%B5%82%E4%BA%86%E3%81%97%E3%81%A6%E3%81%84%E3%81%A6%E5%AE%9F%E8%A1%8C%E4%B8%AD%E3%81%A7%E3%81%82%E3%82%8B%E3%81%9F%E3%82%81%E3%80%81%E3%83%8F%E3%83%B3%E3%83%89%E3%83%AB%E3%81%AF%E5%8D%98%E3%81%AB%E5%89%8A%E9%99%A4%E3%81%95%E3%82%8C%E3%82%8B%E3%81%AE%E3%81%A7%E3%81%AF%E3%81%AA%E3%81%8F%E3%80%81imgNumToRPDone%20%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%9D%E3%81%86%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%A7%E7%B6%BA%E9%BA%97%E3%81%AB%E4%BB%95%E4%B8%8A%E3%81%8C%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E4%BB%A5%E4%B8%8B%E3%81%AE%20Parm%20%E3%81%AF%E3%80%81%E4%B8%8A%E8%A8%98%E3%81%AE%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E5%80%A4%E3%82%92%E5%8F%97%E3%81%91%E5%8F%96%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E4%BB%A5%E4%B8%8B%E3%81%AB%E5%88%A5%E3%81%AE%E5%81%A5%E5%85%A8%E6%80%A7%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%20(%E3%82%B9%E3%83%AD%E3%83%BC)%20%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20readfunction(%0A%20%20%20function(%20%7Bthis%2C%20parm%7D%2C%20%7Btxt%2C%20imagenumber%2Cmachine%7D%2C%0A%20%20%20%20%7Bimagenumber%2Cmachine%7D%20%3D%20parm%20%3B%0A%20%20%20%20%2F%2Fshow(%22readfunc%22%2Cimagenumber%2Cmachine)%3B%0A%20%20%20%20txt%20%3D%20%22%22%3B%0A%20%20%20%20%2F%2Fwrite(%22readfun(%22%7C%7Cchar(imagenumber)%7C%7C%22)...%20%22)%3B%0A%20%20%20%20While(%20this%20%26lt%3B%26lt%3B%20canread%2C%20txt%20%3D%20txt%20%7C%7C%20(this%20%26lt%3B%26lt%3B%20read)%20)%3B%0A%20%20%20%20if(%20Length(%20txt%20)%20%26gt%3B%200%2C%0A%20%20%20%20%20%2F%2Fshow(txt)%3B%0A%20%20%20%20%20imgNumToRPresult%5Bimagenumber%5D%20%3D%20imgNumToRPresult%5Bimagenumber%5D%20%7C%7C%20txt%0A%20%20%20%20)%3B%0A%20%20%20%20if(%20this%20%26lt%3B%26lt%3B%20isreadeof%20%26amp%3B%20imgNumToRP%20%26lt%3B%26lt%3B%20Contains(%20imagenumber%20)%2C%20%2F%2F%20this%20*almost*%20always%20works%2C%20about%201%3A100%20fail%20to%20get%20the%20readeof%20in%20the%20readrunction%0A%20%20%20%20%20imgNumToRPresult%5Bimagenumber%5D%20%3D%20%22%5C!n%22%20%7C%7C%20char(imagenumber)%20%7C%7C%20%22%3A%20%22%20%7C%7C%20imgNumToRPresult%5Bimagenumber%5D%20%7C%7C%20%22%5C!n%22%3B%20%20%2F%2F%20NoInterleave%20save%20this%20with%20count%20and%20basin%0A%20%20%20%20%20process(%20imagenumber%20)%3B%0A%20%20%20%20%20imgNumToRPdone%5Bimagenumber%5D%20%3D%20imgNumToRP%5Bimagenumber%5D%3B%0A%20%20%20%20%20imgNumToRP%20%26lt%3B%26lt%3B%20removeitem(%20imagenumber%20)%3B%0A%20%20%20%20%20if(imgNumToMachine%5Bimagenumber%5D!%3Dmachine%2Cthrow(%22a%20machine%20not%20match%22%7C%7Cchar(machine)%7C%7C%22%2C%22%7C%7Cchar(imgNumToMachine%5Bimagenumber%5D)))%3B%0A%20%20%20%20%20condat%5Bmachine%5D%5Brunning%5D%20%3D%20condat%5Bmachine%5D%5Brunning%5D%20-%201%3B%0A%20%20%20%20%20imgNumToMachine%5Bimagenumber%5D%20%3D%200%3B%0A%20%20%20%20)%3B%0A%20%20%20)%0A%20%20)%0A%20)%3B%0A%20(imgNumToRP%5Bimagenumber%5D)%20%26lt%3B%26lt%3B%20writeeof%3B%0A%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EmakePythonCode%20%E9%96%A2%E6%95%B0%E3%81%AF%E3%80%81oneStep%20%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%81%8C%E7%B5%84%E3%81%BF%E8%BE%BC%E3%81%BE%E3%82%8C%E3%81%9F%20.py%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E7%94%9F%E6%88%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20Python%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AB%E3%81%AF%E3%80%81%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%20%E3%83%A9%E3%82%A4%E3%83%B3%E3%82%92%E8%A7%A3%E6%9E%90%E3%81%97%E3%81%A6%E7%94%BB%E5%83%8F%E3%82%B5%E3%82%A4%E3%82%BA%E3%81%A8%E5%87%BA%E5%8A%9B%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%90%8D%E6%83%85%E5%A0%B1%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%20init()%20%E9%96%A2%E6%95%B0%E3%81%8C%E5%90%AB%E3%81%BE%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E3%83%87%E3%83%BC%E3%82%BF%E3%81%AF%E3%80%81%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%20%E3%83%A9%E3%82%A4%E3%83%B3%20%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%A8%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%81%AB%E3%83%99%E3%82%A4%E3%82%AF%E3%81%95%E3%82%8C%E3%81%9F%202%20%E3%81%A4%E3%81%AE%E6%96%B9%E6%B3%95%E3%81%A7%E6%B8%A1%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%8A%E3%81%9D%E3%82%89%E3%81%8F%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E6%83%85%E5%A0%B1%E3%81%8C%E7%84%BC%E3%81%8D%E8%BE%BC%E3%81%BE%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E5%8F%AF%E8%83%BD%E6%80%A7%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%82%92%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AB%E7%84%BC%E3%81%8D%E8%BE%BC%E3%82%80%E7%90%86%E7%94%B1%E3%81%8C%E3%81%AA%E3%81%84%E5%A0%B4%E5%90%88%20(oneStep%20%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%82%92%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AB%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%E3%81%99%E3%82%8B%E3%81%AA%E3%81%A9)%E3%80%81%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%20RunProgram%20%E3%81%AB%E5%AF%BE%E3%81%97%E3%81%A6%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E3%82%B3%E3%83%94%E3%83%BC%E3%81%8C%201%20%E3%81%A4%E3%81%A0%E3%81%91%E5%BF%85%E8%A6%81%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%E3%81%AB%E3%82%88%E3%81%A3%E3%81%A6%E5%AE%8C%E5%85%A8%E3%81%AB%E5%88%B6%E5%BE%A1%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%20Python%20%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AF%E3%80%81%E8%A4%87%E6%95%B0%E3%81%AE%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%A7%201%20%E3%81%A4%E3%81%AE%E7%94%BB%E5%83%8F%E3%82%92%E5%87%A6%E7%90%86%E3%81%97%E3%81%9F%E3%81%84%E5%A0%B4%E5%90%88%E3%81%AB%E3%80%81%E5%95%8F%E9%A1%8C%E3%81%AE%E4%B8%80%E9%83%A8%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%A7%E3%81%8D%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E8%A8%98%E8%BF%B0%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E5%BE%8C%E3%81%A7%E3%83%91%E3%83%BC%E3%83%84%E3%82%92%E5%86%8D%E7%B5%90%E5%90%88%E3%81%99%E3%82%8B%E3%81%AE%E3%81%A7%E3%81%AF%E3%81%AA%E3%81%8F%E3%80%81%E5%AE%8C%E5%85%A8%E3%81%AA%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%E3%82%92%E4%B8%80%E5%BA%A6%E3%81%AB%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E6%96%B9%E3%81%8C%E3%80%81%E5%85%A8%E4%BD%93%E7%9A%84%E3%81%AB%E9%AB%98%E9%80%9F%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EmakePythonCode%20%3D%20function(%7Bimagenumber%2ConeStep%7D%2C%7Bfilename%2Cpython%7D%2C%0A%20python%20%3D%0A%20%22%5C%5B%0Aimport%20cmath%2C%20math%2C%20sys%2C%20getopt%0Aimport%20numpy%20as%20np%0A%0A%0Adef%20main()%3A%0A%20%20%20%20%0A%20%20%20%20offset%2C%20step%2C%20ixdim%2C%20iydim%2C%20top%2C%20bottom%2C%20left%2C%20right%2C%20filename%20%3D%20init()%20%20%20%23%20NoInterleave%20offset%20will%20be%200%20and%20step%20will%20be%201%0A%20%20%20%20iymax%20%3D%20iydim%20-%201%0A%20%20%20%20ixmax%20%3D%20ixdim%20-%201%0A%20%20%20%20yrange%20%3D%20top%20-%20bottom%0A%20%20%20%20xrange%20%3D%20right%20-%20left%0A%0A%20%20%20%20result%20%3D%20np.zeros(%20(int(math.ceil((iydim*ixdim-offset)%2Fstep))%2C2)%2Cdtype%3Dnp.int16)%20%23%20count%2C%20basin%20%23%20NoInterleave%20simpler%2C%20no%20change%20required%20though%0A%20%20%20%20iresult%20%3D%200%0A%0A%20%20%20%20ix%20%3D%20offset%20%23%20NoInterleave%20like%20iy%2C%20now%20begins%20at%20zero%0A%20%20%20%20iy%20%3D%200%0A%20%20%20%20while%20ix%20%26gt%3B%20ixmax%3A%20%23%20normalize%20before%20loop%20starts%0A%20%20%20%20%20%20%20%20ix%20%3D%20ix%20-%20ixdim%0A%20%20%20%20%20%20%20%20iy%20%3D%20iy%20%2B%201%0A%20%20%20%20y%20%3D%20bottom%20%2B%20yrange%20*%20iy%20%2F%20iymax%20%23%20%20after%20iy%20is%20normalized%2C%20before%20loop%0A%0A%20%20%20%20roundedComplexToBasinId%20%3D%20%7B%7D%0A%20%20%20%20basinIdToBasinSize%20%3D%20%7B%7D%20%23%20NoInterleave%20this%20might%20be%20useful%2C%20but%20needs%20to%20be%20appended%20to%20file%20(now%20a%20constant%20size%20for%20main%20chunk)%0A%20%20%20%20nextBasinId%20%3D%201%20%23%20reserve%20basin%201%20for%20%22did%20not%20converge%22%0A%0A%20%20%20%20while%20iy%20%26lt%3B%3D%20iymax%3A%0A%20%20%20%20%20%20%20%20x%20%3D%20left%20%2B%20xrange%20*%20ix%20%2F%20ixmax%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20xOld%20%3D%20complex(x%2Cy)%20%20%20%20%23xOld%20-%20(xOld%20**%205%20-%201)%20%2F%20(5%20*%20xOld%20**%204)%0A%20%20%20%20%20%20%20%20count%20%3D%200%0A%20%20%20%20%20%20%20%20try%3A%20%23%23%20catch%20zero%20divide%2C%20rarely%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20irun%20in%20range(1%2C1000)%3A%20%23%20NoInterleave%20prev%20stopped%20at%20100%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%23%23xNew%20%3D%20xOld%20-%20(xOld%20**%205%20-%201)%20%2F%20(5%20*%20xOld%20**%204)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%5C%22%20%7C%7C%20%2F%2F%20maintain%20the%20indent%20and%20newlines!%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E6%AC%A1%E3%81%AE%E8%A1%8C%E3%81%AF%E3%83%99%E3%82%A4%E3%82%AF%E3%82%A4%E3%83%B3%E3%83%93%E3%83%83%E3%83%88%E3%81%A7%E3%81%99%E2%80%A6OneStep%20%E3%81%AF%E3%80%812%20%E8%A1%8C%E4%B8%8A%E3%81%AE%20%23%23%23%20%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E3%80%81xOld%20%E5%80%A4%E3%81%A8%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%88%E3%83%B3%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%81%8B%E3%82%89%20xNew%20%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B%E6%9C%89%E5%8A%B9%E3%81%AA%20Python%20%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%81%AE%20JSL%20%E6%96%87%E5%AD%97%E5%88%97%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20oneStep%20%7C%7C%20%22%5C%5B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20count%20%2B%3D%201%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20delta%20%3D%20abs(xNew%20-%20xOld)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20dist%20%3D%20abs(xOld)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20delta%20%26lt%3B%201e-15%20*%20dist%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20xOld%20%3D%20xNew%0A%20%20%20%20%20%20%20%20%20%20%20%20xOld%20%3D%20complex(%20round(xOld.real%2C10)%2C%20round(xOld.imag%2C10)%20)%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20irun%20%26gt%3B%3D%20999%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20basinId%20%3D%201%20%23%20arbitrary%2C%20but%20available%20always.%20did%20not%20converge.%0A%20%20%20%20%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20try%3A%20%23%23%20catch%20new%20basin%20discovered%2C%20rarely%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20basinId%20%3D%20roundedComplexToBasinId%5BxOld%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20except%20KeyError%20as%20e%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20nextBasinId%20%2B%3D%201%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20roundedComplexToBasinId%5BxOld%5D%20%3D%20nextBasinId%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20basinId%20%3D%20nextBasinId%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20basinIdToBasinSize%5BbasinId%5D%20%3D%200%0A%23%23%23%20%20%20%20%20%20%20%20%20%20%20%20print(offset%2C%20count%2C%20xOld%2C%20basinId)%0A%20%20%20%20%20%20%20%20except%20ZeroDivisionError%20as%20e%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20basinId%20%3D%20-1%0A%23%23%23%20%20%20%20%20%20%20%20%20%20%20%20print(offset%2C%20e)%0A%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20result%5Biresult%2C0%5D%20%3D%20count%0A%20%20%20%20%20%20%20%20except%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20print(%22oops%22%2Cix%2Ciy)%0A%20%20%20%20%20%20%20%20if%20basinId%20%26gt%3B%3D%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20basinIdToBasinSize%5BbasinId%5D%20%2B%3D%201%0A%20%20%20%20%20%20%20%20%20%20%20%20except%20KeyError%20as%20e%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20basinIdToBasinSize%5BbasinId%5D%20%3D%201%20%23%20happens%20with%20basinId%3D%3D1%0A%20%20%20%20%20%20%20%20result%5Biresult%2C1%5D%20%3D%20basinId%0A%20%20%20%20%20%20%20%20iresult%20%2B%3D%201%0A%0A%20%20%20%20%20%20%20%20ix%20%3D%20ix%20%2B%20step%20%23%20advance%0A%23%23%23%20%20%20%20%20%20%20%20offset%20%3D%20offset%20%2B%20step%20%23%20needed%20for%20return%20value%0A%20%20%20%20%20%20%20%20while%20ix%20%26gt%3B%20ixmax%3A%20%23%20re-normalize%0A%20%20%20%20%20%20%20%20%20%20%20%20ix%20%3D%20ix%20-%20ixdim%0A%20%20%20%20%20%20%20%20%20%20%20%20iy%20%3D%20iy%20%2B%201%0A%20%20%20%20%20%20%20%20%20%20%20%20y%20%3D%20bottom%20%2B%20yrange%20*%20iy%20%2F%20iymax%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%81%93%E3%82%8C%E3%81%AF%E3%80%81%E6%95%B4%E6%95%B0%E3%81%A8%E5%80%8D%E7%B2%BE%E5%BA%A6%E3%81%AE%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E6%9B%B8%E3%81%8D%E8%BE%BC%E3%82%80%20Python%20%E3%82%B3%E3%83%BC%E3%83%89%E3%81%A7%E3%81%99%E3%80%82%20double%20%E3%81%AF%E6%95%B4%E6%95%B0%E3%81%AE%E5%BE%8C%E3%81%AB%E7%B6%9A%E3%81%8D%E3%80%81JMP%20%E3%81%8C%20blobToMatrix%20%E3%81%A7%E3%81%99%E3%81%B9%E3%81%A6%E3%82%92%E7%B0%A1%E5%8D%98%E3%81%AB%E5%8F%96%E5%BE%97%E3%81%A7%E3%81%8D%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%23%20output%20results%0A%0A%20%20%20%20fileobj%20%3D%20open(filename%2C%20mode%3D'wb')%20%23%20NoInterleave%20maybe%20prepend%20a%20descriptor%0A%20%20%20%20result.tofile(fileobj)%20%23%20NoInterleave%20append%20after%20this%20constant%20size%20block%0A%20%20%20%20%23%20NoInterleave%20append%20roundedComplexToBasinId%20and%20basinIdToBasinSize%20rather%20than%20printing%20them%2C%20they%20should%20be%20same%20dimension%0A%20%20%20%20%23%204%208-byte%20doubles%3A%20real%2Cimag%2Cbasin%2Csize%0A%20%20%20%20temp%20%3D%20np.zeros(%20(len(roundedComplexToBasinId)%2C4)%2Cdtype%3Dnp.float64)%0A%20%20%20%20itemp%20%3D%200%0A%20%20%20%20for%20iz%20in%20roundedComplexToBasinId.keys()%3A%0A%20%20%20%20%20%20%20%20temp%5Bitemp%2C0%5D%20%3D%20iz.real%0A%20%20%20%20%20%20%20%20temp%5Bitemp%2C1%5D%20%3D%20iz.imag%0A%20%20%20%20%20%20%20%20temp%5Bitemp%2C2%5D%20%3D%20roundedComplexToBasinId%5Biz%5D%0A%20%20%20%20%20%20%20%20temp%5Bitemp%2C3%5D%20%3D%20basinIdToBasinSize%5BroundedComplexToBasinId%5Biz%5D%5D%0A%20%20%20%20%20%20%20%20itemp%20%2B%3D%201%0A%20%20%20%20temp.tofile(fileobj)%0A%20%20%20%20fileobj.close()%0A%0A%20%20%20%20print(%22sentinel%22)%3B%20%23%20so%20JSL%20can%20test%20if%20this%20ran%20to%20the%20end...%0A%20%20%20%20%0Adef%20init()%3A%0A%20%20%20%20offset%20%3D%200%0A%20%20%20%20step%20%3D%201%0A%20%20%20%20xdim%20%3D%203%0A%20%20%20%20ydim%20%3D%202%0A%20%20%20%20top%20%3D%20-1.0%0A%20%20%20%20bottom%20%3D%201.0%0A%20%20%20%20left%20%3D%20-1.0%0A%20%20%20%20right%20%3D%201.0%0A%20%20%20%20filename%20%3D%20%22temp.binary%22%0A%0A%20%20%20%20options%2C%20remainder%20%3D%20getopt.getopt(sys.argv%5B1%3A%5D%2C%20's%3Ax%3Ay%3Ao%3At%3Ab%3Al%3Ar%3Af%3A')%0A%20%20%20%20for%20opt%2C%20arg%20in%20options%3A%0A%20%20%20%20%20%20%20%20if%20opt%20%3D%3D%20'-o'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20offset%20%3D%20int(arg)%20%23%20offset%20is%20the%20starting%20point%0A%20%20%20%20%20%20%20%20elif%20opt%20%3D%3D%20'-s'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20step%20%3D%20int(arg)%20%23%20step%20to%20the%20next%20point%0A%20%20%20%20%20%20%20%20elif%20opt%20%3D%3D%20'-x'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20xdim%20%3D%20int(arg)%20%23%20xdim%20field%20int%20size%0A%20%20%20%20%20%20%20%20elif%20opt%20%3D%3D%20'-y'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20ydim%20%3D%20int(arg)%20%23%20ydim%20field%20int%20size%0A%20%20%20%20%20%20%20%20elif%20opt%20%3D%3D%20'-t'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20top%20%3D%20float(arg)%20%23%20top%20of%20field%20user%20coords%0A%20%20%20%20%20%20%20%20elif%20opt%20%3D%3D%20'-b'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20bottom%20%3D%20float(arg)%20%23%20bot%20field%20user%20coords%0A%20%20%20%20%20%20%20%20elif%20opt%20%3D%3D%20'-l'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20left%20%3D%20float(arg)%20%23%20left%20field%20user%20coords%0A%20%20%20%20%20%20%20%20elif%20opt%20%3D%3D%20'-r'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20right%20%3D%20float(arg)%20%23%20right%20field%20user%20coords%0A%20%20%20%20%20%20%20%20elif%20opt%20%3D%3D%20'-f'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20filename%20%3D%20arg%20%23%20write%20binary%20file%0A%0A%20%20%20%20print(%22%20xdim%3D%22%2Cxdim%2C%0A%20%20%20%20%20%20%20%20%22%20ydim%3D%22%2Cydim%2C%0A%20%20%20%20%20%20%20%20%22%20offset%3D%22%2Coffset%2C%0A%20%20%20%20%20%20%20%20%22%20step%3D%22%2Cstep%2C%0A%20%20%20%20%20%20%20%20%22%20top%3D%22%2Ctop%2C%0A%20%20%20%20%20%20%20%20%22%20bottom%3D%22%2Cbottom%2C%0A%20%20%20%20%20%20%20%20%22%20left%3D%22%2Cleft%2C%0A%20%20%20%20%20%20%20%20%22%20right%3D%22%2Cright)%0A%20%20%20%20return%20offset%2C%20step%2C%20xdim%2C%20ydim%2C%20top%2C%20bottom%2C%20left%2C%20right%2C%20filename%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20main()%0A%20%20%20%20%0A%5D%5C%22%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EPython%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%AF%E3%80%81%E4%B8%80%E6%84%8F%E3%81%AE%E7%95%AA%E5%8F%B7%E3%82%92%E4%BB%98%E3%81%91%E3%81%A6%20(Windows%20%E3%81%8C%E8%AA%8D%E8%AD%98%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B)%20NFS%20%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E4%BF%9D%E5%AD%98%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E8%BF%94%E3%81%95%E3%82%8C%E3%81%9F%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%90%8D%E3%81%AF%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%20Linux%20%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%AE%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%90%8D%E3%81%AF%E8%B5%B7%E5%8B%95%E9%96%A2%E6%95%B0%E3%81%AB%E3%82%88%E3%81%A3%E3%81%A6%E4%BD%9C%E6%88%90%E3%81%95%E3%82%8C%E3%80%81Plink%20%E7%B5%8C%E7%94%B1%E3%81%A7%E6%B8%A1%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20(%E4%BB%8A%E3%81%AFJSL%E3%81%AB%E6%88%BB%E3%81%A3%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99...)%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20filename%20%3D%20Save%20Text%20File(%20%22%5C%5CVBOXSVR%5Cnfsc%5Cfarm%5Ctestpython%22%7C%7Cchar(imagenumber)%7C%7C%22.py%22%2C%20python%20)%3B%20%20%2F%2F%20NoInterleave%20-%20unique%20file%20name%20for%20each%20picture%20because%20the%20equation%20changes%0A%20return(filename)%3B%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E4%BB%A5%E4%B8%8B%E3%81%AE%E3%83%AB%E3%83%BC%E3%83%97%E3%81%AF%2010%2C000%20%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%82%92%E7%94%9F%E6%88%90%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Efor(%20imagenumber%20%3D%200%2C%20imagenumber%20%26lt%3B%2010000%2C%20imagenumber%20%2B%3D%201%2C%20%2F%2F%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%20frame%20loop%20%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%26lt%3B%0A%20write(%22%5C!nloop%22%2Cimagenumber)%3B%0A%20%2F%2F%20for%20X%5E5%20-%201%20there%20are%205%20roots%3B%201%20real%20and%204%20complex%0A%20%2F%2F%20the%20python%20expression%20for%20x(n%2B1)%20%3D%20x(n)%20-%20F%20%2F%20F'%20is%0A%20%2F%2F%20xNew%20%3D%20xOld%20-%20(xOld%20**%205%20-%201)%20%2F%20(5%20*%20xOld%20**%204)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E6%95%B0%E5%BC%8F%E3%81%A8%20OneStep%20%E3%81%8B%E3%82%89%20Python%20%E3%82%B9%E3%83%86%E3%83%BC%E3%83%88%E3%83%A1%E3%83%B3%E3%83%88%E3%81%B8%E3%81%AE%E5%A4%89%E6%8F%9B%20-%20%E5%AE%9F%E9%9A%9B%E3%81%AE%E5%80%A4%E3%82%92%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%20F1...F6%20%E3%81%8A%E3%82%88%E3%81%B3%20E1...E6%20%E3%81%AB%E4%BB%A3%E5%85%A5%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%80%81%E3%81%93%E3%82%8C%E3%81%AF%E8%A4%87%E9%9B%91%E3%81%AB%E8%A6%8B%E3%81%88%E3%81%BE%E3%81%99%E3%80%82%20%E6%9C%80%E5%BE%8C%E3%81%AB%E9%9A%A0%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E3%81%AE%E3%81%AF%E3%80%81JSL%20%E3%81%AE%20%5E%20%E3%81%8B%E3%82%89%20Python%20%E3%81%AE%20**%20%E3%81%B8%E3%81%AE%E5%A4%89%E6%9B%B4%E3%81%A7%E3%81%99%E3%80%82JSL%20%E3%81%AB%E3%81%AF%20**%20%E3%82%92%E5%BC%8F%E3%81%A8%E3%81%97%E3%81%A6%E8%A1%A8%E3%81%99%E6%96%B9%E6%B3%95%E3%81%8C%E3%81%AA%E3%81%84%E3%81%9F%E3%82%81%E3%80%81%E5%BC%8F%E3%81%A7%E3%81%AF%E3%81%AA%E3%81%8F%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%A7%E8%A1%8C%E3%82%8F%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20F1...E6%20%E3%81%AF%E5%BC%8F%E3%81%A8%E3%81%97%E3%81%A6%E6%89%B1%E3%82%8F%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20Sin(%20imagenumber%20%2F%20200%20)%20%E3%81%AF%E3%80%81-1%20%E3%81%8B%E3%82%89%201%20%E3%81%BE%E3%81%A7%E3%81%AE%E3%81%8A%E3%82%88%E3%81%9D%2010%20%E5%80%8B%E3%81%AE%E5%AE%8C%E5%85%A8%E3%81%AA%E6%AD%A3%E5%BC%A6%E6%B3%A2%E3%81%A7%E3%81%99%E3%80%82%20%E6%AD%A3%E5%BC%A6%E6%B3%A2%E3%81%AF%E7%B4%84%E6%95%B0%E3%81%8C%E7%95%B0%E3%81%AA%E3%82%8B%E3%81%9F%E3%82%81%E5%91%A8%E6%B3%A2%E6%95%B0%E3%81%8C%E7%95%B0%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E5%9B%A0%E6%95%B0%E3%81%AF%20-2%20%E3%81%8B%E3%82%89%202%20%E3%81%BE%E3%81%A7%E3%82%B9%E3%83%A0%E3%83%BC%E3%82%BA%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%97%E3%80%81%E6%8C%87%E6%95%B0%E3%81%AF%201...6%20%E3%81%AE%E3%82%BF%E3%83%BC%E3%82%B2%E3%83%83%E3%83%88%E3%82%92%E4%B8%AD%E5%BF%83%E3%81%AB%20%2B%2F-%201%20%E3%81%9A%E3%81%A4%E3%82%B9%E3%83%A0%E3%83%BC%E3%82%BA%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%97%E3%81%9F%E3%81%8C%E3%81%A3%E3%81%A6%E3%80%81%E3%81%82%E3%82%8B%E5%86%99%E7%9C%9F%E3%81%8B%E3%82%89%E6%AC%A1%E3%81%AE%E5%86%99%E7%9C%9F%E3%81%B8%E3%81%AE%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%81%AF%E3%81%8B%E3%81%AA%E3%82%8A%E4%BC%BC%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E5%B0%91%E3%81%97%E4%BA%88%E6%B8%AC%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84%E3%81%BB%E3%81%A9%E5%A4%89%E5%8C%96%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20FF%20%3D%20Derivative(%20Name%20Expr(%20F%20)%2C%20xOld%20)%3B%0A%20%2F%2F%20onestep%20will%20be%20inserted%20into%20python%20below%0A%20oneStep%20%3D%20substitute(%20%2F%2F%20%22xNew%20%3D%20xOld%20-%20(xOld%20**%205%20-%201)%20%2F%20(5%20*%20xOld%20**%204)%22%0A%20%20%20char(%20%2F%2F%20%22xNew%20%3D%20xOld%20-%20(xOld%20%5E%205%20-%201)%20%2F%20(5%20*%20xOld%20%5E%204)%22%0A%20%20%20%20substitute(%20%2F%2F%20char()%20adds%20the%20parens%20around%20F%20and%20FF%0A%20%20%20%20%20Expr(%20xNew%20%3D%20xOld%20-%20F%20%2F%20FF%20)%2C%20%2F%2F%20build%20the%20statement%20with%20symbols%2C%20then%0A%20%20%20%20%20Expr(%20F%20)%2C%20Name%20Expr(%20F%20)%2C%20%2F%2F%20replace%20F%20and%20FF%20symbols%20with%20the%20content%0A%20%20%20%20%20Expr(%20FF%20)%2C%20Name%20Expr(%20FF%20)%2C%20%2F%2F%20of%20the%20function%20and%20derivative%0A%20%20%20%20%20Expr(%20F6%20)%2C%20round(2%20*%20Sin(%20imagenumber%20%2F%20(200%2B5)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20F5%20)%2C%20round(2%20*%20Sin(%20imagenumber%20%2F%20(200%2B7)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20F4%20)%2C%20round(2%20*%20Sin(%20imagenumber%20%2F%20(200%2B11)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20F3%20)%2C%20round(2%20*%20Sin(%20imagenumber%20%2F%20(200%2B13)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20F2%20)%2C%20round(2%20*%20Sin(%20imagenumber%20%2F%20(200%2B17)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20F1%20)%2C%20round(2%20*%20Sin(%20imagenumber%20%2F%20(200%2B19)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20E6%20)%2C%20round(6.0%20%2B%20Sin(%20imagenumber%20%2F%20(200%2B23)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20E5%20)%2C%20round(5.0%20%2B%20Sin(%20imagenumber%20%2F%20(200%2B29)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20E4%20)%2C%20round(4.0%20%2B%20Sin(%20imagenumber%20%2F%20(200%2B31)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20E3%20)%2C%20round(3.0%20%2B%20Sin(%20imagenumber%20%2F%20(200%2B37)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20E2%20)%2C%20round(2.0%20%2B%20Sin(%20imagenumber%20%2F%20(200%2B41)%20)%20%2F%202%2C3)%2C%0A%20%20%20%20%20Expr(%20E1%20)%2C%20round(1.0%20%2B%20Sin(%20imagenumber%20%2F%20(200%2B47)%20)%20%2F%202%2C3)%0A%20%20%20%20)%20%2F%2F%20sub%20F%2CFF%0A%20%20%20)%2C%20%2F%2F%20char%0A%20%20%22%5E%22%2C%20%22**%22%0A%20)%3B%20%2F%2F%20substitute%20%5E%20in%20JSL%20to%20**%20in%20python%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EimgNumToLabel%20%E9%80%A3%E6%83%B3%E9%85%8D%E5%88%97%E3%81%AF%E3%80%81%E5%BE%8C%E3%81%A7%E7%94%BB%E5%83%8F%E3%81%AB%E3%83%A9%E3%83%99%E3%83%AB%E3%82%92%E4%BB%98%E3%81%91%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E4%BD%BF%E7%94%A8%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%20xOld-%26gt%3BX...%20%E3%82%92%E5%8D%98%E7%B4%94%E5%8C%96%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20imgNumToLabel%5Bimagenumber%5D%3Dsubstitute(regex(oneStep%2C%22xNew%20%3D%20xOld%20-%20%5C((.*%3F)%5C)%20%2F%20%22%2C%22%5C1%22)%2C%22%20**%20%22%2C%22%5E%22%2C%22%20*%20%22%2C%22%C2%B7%22%2C%22xOld%22%2C%22X%22)%3B%0A%20write(%22%5C!n%22%2CimgNumToLabel%5Bimagenumber%5D)%3B%0A%20%0A%20%2F%2F%22%2Fmnt%2Fnfsc%2Ffarm%2Fbinary%22%20%7C%7C%20char(imagenumber)%20%7C%7C%20%22.generated%22%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E6%97%A2%E5%AD%98%E3%81%AE%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AE%E3%83%86%E3%82%B9%E3%83%88%E3%81%AF%E3%80%81%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E5%86%8D%E8%B5%B7%E5%8B%95%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AB%E5%87%A6%E7%90%86%E3%82%92%E9%AB%98%E9%80%9F%E5%8C%96%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E9%96%8B%E7%99%BA%E4%B8%AD%E3%81%AB%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%20%E6%9C%80%E5%BE%8C%E3%81%AE%E5%AE%9F%E8%A1%8C%20(3%20%E6%97%A5%E9%96%93!)%20%E3%81%AB%E3%81%AF%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%81%AA%E3%81%8B%E3%81%A3%E3%81%9F%E3%81%AE%E3%81%A7%E3%80%81%E5%AE%8C%E5%85%A8%E3%81%AB%E6%AD%A3%E3%81%97%E3%81%8F%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%AA%E3%81%84%E5%8F%AF%E8%83%BD%E6%80%A7%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20if(fileexists(%22%5C%5CVBOXSVR%5Cnfsc%5Cfarm%5Cbinary%22%20%7C%7C%20char(imagenumber)%20%7C%7C%20%22.generated%22)%2C%0A%20%20write(%22Exists%20%22%2C%22%5C%5CVBOXSVR%5Cnfsc%5Cfarm%5Cbinary%22%20%7C%7C%20char(imagenumber)%20%7C%7C%20%22.generated%22)%3B%0A%20%20continue()%3B%0A%20)%3B%0A%20%0A%20makePythonCode(imagenumber%2ConeStep)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%81%93%E3%82%8C%E3%81%AF%E5%A0%B4%E9%81%95%E3%81%84%E3%81%AA%E6%94%BE%E6%A3%84%E3%81%95%E3%82%8C%E3%81%9F%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E8%A6%8B%E3%81%88%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20n%20%3D%200%3B%20%2F%2F%20eventually%20this%20becomes%20the%20offset%20%20%2F%2F%20NoInterleave%20offset%20is%20always%200%0A%20sentinels%20%3D%200%3B%20%2F%2F%20NoInterleave%20%22sentinel%22%20might%20be%20all%20it%20returns%0A%20%2F%2Fwrite(%22Launching...%20%22)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%81%93%E3%81%93%E3%81%8B%E3%82%89%2010%2C000%20%E3%81%AE%20RunPrograms%20%E3%81%8C%E5%A7%8B%E3%81%BE%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%AF%E3%82%8B%E3%81%8B%E3%81%AB%E4%B8%8A%E3%81%AE%20condat%20%E5%80%A4%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%A8%E3%80%8150%20%E3%81%BE%E3%81%9F%E3%81%AF%2060%20%E3%81%8C%E5%90%8C%E6%99%82%E3%81%AB%E5%AE%9F%E8%A1%8C%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20launch(%20imagenumber%20)%3B%0A%20write(%22Launched.%20%22)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%81%BE%E3%81%A8%E3%82%81...%E6%9C%80%E5%BE%8C%E3%81%AE%E3%81%84%E3%81%8F%E3%81%A4%E3%81%8B%E3%81%AE%20RunPrograms%20%E3%81%8C%E7%B5%82%E4%BA%86%E3%81%99%E3%82%8B%E3%81%BE%E3%81%A7%E5%BE%85%E3%81%A1%E3%81%BE%E3%81%99%E3%80%82Unstick%20%E3%81%8C%201%20%E3%81%A4%E3%81%BE%E3%81%9F%E3%81%AF%202%20%E3%81%A4%E8%A6%8B%E3%81%A4%E3%81%8B%E3%82%8B%E5%8F%AF%E8%83%BD%E6%80%A7%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ewhile(%20N%20Items(%20imgNumToRP%20)%20%26gt%3B%200%2C%0A%20Wait(%20.1%20)%3B%0A%20unstick()%3B%20%0A)%3B%0A%0Awrite(%22%5C!ndone%22)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%83%A9%E3%83%99%E3%83%AB%E3%81%AF%E3%80%81%E5%BE%8C%E3%81%A7%E7%94%BB%E5%83%8F%E3%82%B8%E3%82%A7%E3%83%8D%E3%83%AC%E3%83%BC%E3%82%BF%E3%83%BC%E7%94%A8%E3%81%AB%E4%BF%9D%E5%AD%98%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E4%B8%8A%E8%A8%98%E3%81%AE%20JSL%2FPython%20%E3%81%AF%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%20%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E6%97%A2%E3%81%AB%E4%BF%9D%E5%AD%98%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81.png%20%E5%BD%A2%E5%BC%8F%E3%81%B8%E3%81%AE%E5%A4%89%E6%8F%9B%E3%81%8C%E3%81%BE%E3%81%A0%E5%BF%85%E8%A6%81%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Esavetextfile(%22%24desktop%2FimgNumToLabel.txt%22%2Cchar(imgNumToLabel))%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ERpdone%20%E3%81%AF%2010%2C000%20%E3%81%AE%E7%B5%82%E4%BA%86%E3%81%97%E3%81%9F%20RunProgram%20%E3%82%92%E4%BF%9D%E6%8C%81%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E6%89%8B%E6%94%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EimgNumToRPdone%20%3D%200%3B%2F%2F%20clean%20out%20%20%2F%2F%20NoInterleave%20picture%20generation%20happens%20after%20all%20count%20and%20basin%20are%20created%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E7%94%BB%E5%83%8F%E3%82%B8%E3%82%A7%E3%83%8D%E3%83%AC%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%AF%E4%BB%8A%E3%81%99%E3%81%90%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%82%82%E3%80%81%E5%BE%8C%E3%81%A7%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%82%82%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Einclude(%22pythonFarmDisplay.jsl%22)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%81%93%E3%82%8C%E3%81%A7%20Beowulf%20%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AF%E7%B5%82%E3%82%8F%E3%82%8A%E3%81%A7%E3%81%99%E3%80%82%20%E7%94%BB%E5%83%8F%E3%82%B8%E3%82%A7%E3%83%8D%E3%83%AC%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%AF%E3%81%9D%E3%82%8C%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%82%82%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%E3%80%82%20%E3%83%93%E3%83%87%E3%82%AA%E3%81%A7%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E9%96%93%E3%81%A7%E5%90%8C%E3%81%98%E8%89%B2%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%9F%E3%81%84%E3%81%A8%E8%80%83%E3%81%88%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E8%89%B2%E3%81%AF%E5%BC%95%E5%8A%9B%E3%81%AE%E7%9B%86%E5%9C%B0%E3%82%92%E8%A1%A8%E3%81%97%E3%80%81%E7%9B%86%E5%9C%B0%E3%81%AE%E4%BB%BB%E6%84%8F%E3%81%AE%E7%82%B9%E3%81%8C%E5%BC%95%E3%81%8D%E4%BB%98%E3%81%91%E3%82%89%E3%82%8C%E3%82%8B%E3%82%BC%E3%83%AD%E3%81%AF%E5%90%8C%E3%81%98%E8%89%B2%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%9F%E3%81%A0%E3%81%97%E3%80%81%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%81%AF%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%81%94%E3%81%A8%E3%81%AB%E5%B0%91%E3%81%97%E3%81%9A%E3%81%A4%E5%A4%89%E5%8C%96%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%80%81%E3%82%BC%E3%83%AD%E3%81%8C%E5%8B%95%E3%81%8D%E5%9B%9E%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E7%94%BB%E5%83%8F%E3%82%B8%E3%82%A7%E3%83%8D%E3%83%AC%E3%83%BC%E3%82%BF%E3%83%BC%E3%81%AF%E3%80%81%E5%89%8D%E3%81%AE%E7%94%BB%E5%83%8F%E3%81%AE%E3%82%BC%E3%83%AD%E3%82%92%E6%AC%A1%E3%81%AE%E7%94%BB%E5%83%8F%E3%81%A8%E4%B8%80%E8%87%B4%E3%81%95%E3%81%9B%E3%82%88%E3%81%86%E3%81%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E6%99%82%E3%80%85%E3%82%B8%E3%83%A3%E3%83%B3%E3%83%97%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%82%82%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E5%8D%81%E5%88%86%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E7%94%BB%E5%83%8F%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%20JSL%20%E3%81%AF%E6%AC%A1%E3%81%AE%E3%81%A8%E3%81%8A%E3%82%8A%E3%81%A7%E3%81%99%E3%80%82%20%E3%81%BE%E3%81%9A%E6%B4%97%E9%9D%A2%E5%99%A8%E3%81%AE%E3%82%AB%E3%83%A9%E3%83%BC%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%93%E3%82%8C%E3%82%89%E3%81%AF%E5%8F%AF%E8%83%BD%E3%81%AA%E9%99%90%E3%82%8A%E6%98%8E%E3%82%8B%E3%81%84%E8%89%B2%E3%81%AE%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%99%E3%80%82%E5%8F%8D%E5%BE%A9%E5%9B%9E%E6%95%B0%E3%81%8C%E5%A4%9A%E3%81%84%E3%81%A8%E3%80%81%E5%BE%8C%E3%81%A7%E6%9A%97%E3%81%8F%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ecolors%3D%0Ahlscolor(0%2CL%2C1)%7C%7C%20%2F%2F%20dark%20red%0Ahlscolor(.05%2CL%2C0.8)%7C%7C%20%2F%2F%20red%0Ahlscolor(.15%2CL%2C0.9)%7C%7C%20%2F%2F%20orn%0Ahlscolor(.35%2CL%2C1.0)%7C%7C%20%2F%2F%20yel%0Ahlscolor(.50%2CL%2C1.0)%7C%7C%20%2F%2F%20grn%0Ahlscolor(.65%2CL%2C1.0)%7C%7C%20%2F%2F%20cyn%0Ahlscolor(.80%2CL%2C0.7)%7C%7C%20%2F%2F%20blu%0Ahlscolor(.95%2CL%2C1.0)%7C%7C%20%2F%2F%20mag%0Ahlscolor(1.0%2CL%2C0.0)%3B%20%20%2F%2F%20gry%0Aredmap%3Dj(ncols(colors)%2C1%2C0)%3B%0Agreenmap%3Dj(ncols(colors)%2C1%2C0)%3B%0Abluemap%3Dj(ncols(colors)%2C1%2C0)%3B%0Afor(i%3D1%2Ci%26lt%3B%3Dncols(colors)%2Ci%2B%3D1%2C%0A%20%7Br%2Cg%2Cb%7D%3Dcolortorgb(colors%5Bi%5D)%3B%0A%20m%20%3D%20max(r%2Cg%2Cb)%3B%0A%20redmap%5Bi%5D%20%3D%20r%2Fm%3B%0A%20greenmap%5Bi%5D%20%3D%20g%2Fm%3B%0A%20bluemap%5Bi%5D%20%3D%20b%2Fm%3B%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E4%BB%A5%E5%89%8D%E3%81%AB%E4%BF%9D%E5%AD%98%E3%81%97%E3%81%9F%E7%94%BB%E5%83%8F%E3%83%A9%E3%83%99%E3%83%AB%E3%82%92%E5%86%8D%E3%83%AD%E3%83%BC%E3%83%89%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%80%81%E7%94%BB%E5%83%8F%E3%81%AE%E5%AF%B8%E6%B3%95%E3%81%8C%E4%B8%80%E8%87%B4%E3%81%99%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%93%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AF%E5%89%8D%E3%81%AE%E3%82%82%E3%81%AE%E3%81%A8%E5%90%8C%E3%81%98%E3%81%A7%E3%81%82%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%80%81%E5%85%B1%E9%80%9A%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AB%E6%8A%BD%E5%87%BA%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E3%81%AF%E3%81%9A%E3%81%A7%E3%81%99%E3%80%82%20%E3%82%82%E3%81%86%E6%89%8B%E9%81%85%E3%82%8C%E3%81%A7%E3%81%99%EF%BC%81%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EimgNumToLabel%3DInclude(%20%22%24desktop%2FpythonFarmDisplayLabels.jsl%22%20)%3B%0Ascale%20%3D%202%20%2F%201%3B%0Axresolution%20%3D%201920%20*%20scale%3B%0Ayresolution%20%3D%201080%20*%20scale%3B%0A%2F%2F%20keep%20aspect%20ratio%20by%20chopping%20shorter%20dimension...%0A%0Axcenter%20%3D%20-1%3B%0Aycenter%20%3D%200%3B%0Adelta%20%3D%203%3B%0Aytop%20%3D%20ycenter%20-%20delta%20*%20yresolution%20%2F%20xresolution%3B%0Axleft%20%3D%20xcenter%20-%20delta%3B%0Axright%20%3D%20xcenter%20%2B%20delta%3B%0Aybottom%20%3D%20ycenter%20%2B%20delta%20*%20yresolution%20%2F%20xresolution%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E7%9B%86%E5%9C%B0%E3%81%AE%E8%89%B2%E3%81%AF%E3%80%81%E3%82%8F%E3%81%9A%E3%81%8B%E3%81%AB%E7%95%B0%E3%81%AA%E3%82%8B%E7%94%BB%E5%83%8F%2F%E6%96%B9%E7%A8%8B%E5%BC%8F%E3%82%92%E8%BF%BD%E8%B7%A1%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%93%E3%82%8C%E3%81%AF%E3%80%81%E5%89%8D%E3%81%AE%E7%94%BB%E5%83%8F%E3%81%AE%E3%82%BC%E3%83%AD%E3%81%8C%E5%AD%98%E5%9C%A8%E3%81%99%E3%82%8B%E5%A0%B4%E6%89%80%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Eprevzeros%20%3D%20%5B%5D%3B%20%2F%2F%20what%20came%20before%20the%20first%20one%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ENFS%20%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%81%8C%E5%B0%8F%E3%81%95%E3%81%99%E3%81%8E%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%20%E3%81%93%E3%81%93%E3%81%AB%E3%81%AF%20309GB%20%E3%81%AE%E9%9D%9E%E5%9C%A7%E7%B8%AE%E3%83%94%E3%82%AF%E3%82%BB%E3%83%AB%E6%83%85%E5%A0%B1%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F%2Ffilepat%20%3D%20%22%5C%5CVBOXSVR%5Cnfsc%5Cfarm%5Cbinary%5Eimagenumber%5E.generated%22%3B%0A%2F%2F%20manually%20moved%20the%20files%20(running%20out%20of%20space)...%0Afilepat%20%3D%20%22f%3A%5Cnewtonmethod%5Cgenerated%5Cbinary%5Eimagenumber%5E.generated%22%3B%0A%0Acountarray%20%3D%20J(%20yresolution%2C%20xresolution%2C%200%20)%3B%0Abasinarray%20%3D%20J(%20yresolution%2C%20xresolution%2C%200%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AF%202%20%E3%81%A4%E3%81%AE%20JSL%20%E8%A1%8C%E5%88%97%E3%81%AB%E8%A7%A3%E5%87%8D%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%821%20%E3%81%A4%E3%81%AF%E3%83%94%E3%82%AF%E3%82%BB%E3%83%AB%E3%81%AB%E5%BF%85%E8%A6%81%E3%81%AA%E5%8F%8D%E5%BE%A9%E5%9B%9E%E6%95%B0%E3%81%AE%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88%E3%80%81%E3%82%82%E3%81%86%201%20%E3%81%A4%E3%81%AF%E3%83%94%E3%82%AF%E3%82%BB%E3%83%AB%E3%81%AE%E9%A0%98%E5%9F%9F%E3%82%92%E8%AD%98%E5%88%A5%E3%81%99%E3%82%8B%E5%B0%8F%E3%81%95%E3%81%AA%E6%95%B4%E6%95%B0%E3%81%A7%E3%81%99%E3%80%82%20%E3%81%9D%E3%81%AE%E5%BE%8C%E3%81%AB%E3%82%82%E3%81%86%E5%B0%91%E3%81%97%E3%83%90%E3%82%A4%E3%83%8A%E3%83%AA%20%E3%83%87%E3%83%BC%E3%82%BF%20(%E3%83%90%E3%83%A9%E3%83%B3%E3%82%B9%20%E3%83%90%E3%82%A4%E3%83%88)%20%E3%81%8C%E3%81%82%E3%82%8A%E3%80%81%E7%9B%86%E5%9C%B0%E7%95%AA%E5%8F%B7%E3%82%92%E8%A4%87%E7%B4%A0%E5%BA%A7%E6%A8%99%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E8%A4%87%E7%B4%A0%E5%BA%A7%E6%A8%99%E3%81%AF%E3%80%81%E3%81%82%E3%82%8B%E5%86%99%E7%9C%9F%E3%81%8B%E3%82%89%E6%AC%A1%E3%81%AE%E5%86%99%E7%9C%9F%E3%81%AB%E7%85%A7%E5%90%88%E3%81%95%E3%82%8C%E3%82%8B%E3%82%82%E3%81%AE%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EFor(%20imagenumber%20%3D%201%2C%20imagenumber%20%26lt%3B%2010000%2C%20imagenumber%20%2B%3D%201%2C%0A%20file%20%3D%20Eval%20Insert(%20filepat%20)%3B%0A%20If(%20File%20Exists(%20file%20)%2C%0A%20%20bindata%20%3D%20Load%20Text%20File(%20file%2C%20blob()%20)%3B%0A%20%20matdata%20%3D%20Blob%20To%20Matrix(%20bindata%2C%20%22uint%22%2C%202%2C%20%22little%22%2C%202%20)%3B%0A%20%20countArray%5B0%5D%20%3D%20matdata%5B1%20%3A%3A%20yresolution%20*%20xresolution%2C%201%5D%3B%0A%20%20basinArray%5B0%5D%20%3D%20matdata%5B1%20%3A%3A%20yresolution%20*%20xresolution%2C%202%5D%3B%0A%20%20balanceBytes%20%3D%20Length(%20bindata%20)%20-%204%20*%20yresolution%20*%20xresolution%3B%0A%20%20zeros%20%3D%20Blob%20To%20Matrix(%20Blob%20Peek(%20bindata%2C%20Length(%20bindata%20)%20-%20balanceBytes%20)%2C%20%22float%22%2C%208%2C%20%22little%22%2C%204%20)%3B%0A%20%20%2F%2FShow(%20zeros%20)%3B%0A%20%20if(zeros%5B1%2C%203%5D%3D%3D2%2C%0A%20%20%20zeros%20%3D%20%5B9e99%209e99%201%200%5D%20%7C%2F%20zeros%3B%20%2F%2F%20python%20code%20should%20have%20put%20this%20in%0A%20%20)%3B%0A%20%20%2F%2F%20re-assign%20the%20basin%20numbers%20to%20line%20up%20with%20prevzeros%0A%20%20If(%20N%20Rows(%20prevzeros%20)%20%3D%3D%200%2C%0A%20%20%20prevzeros%20%3D%20zeros%0A%20%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EKDTable%20%E3%81%AF%E6%9C%80%E8%BF%91%E5%82%8D%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%81%BE%E3%81%99%E3%80%82%E8%A4%87%E9%9B%91%E3%81%AA%E5%B9%B3%E9%9D%A2%E3%81%AF%E7%B4%A0%E6%99%B4%E3%82%89%E3%81%97%E3%81%84%E8%BF%91%E9%9A%A3%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20kdt%20%3D%20KDTable(%20prevzeros%5B0%2C%201%20%3A%3A%202%5D%20)%3B%20%2F%2F%201%3A%3A2%20means%20the%20real%20and%20imag%20cols%0A%20%20newbasin%20%3D%20(1%20%3A%3A%20N%20Rows(%20zeros%20))%20%2B%2010000%3B%0A%20%20toomany%20%3D%20N%20Rows(%20zeros%20)%20%26gt%3B%20N%20Rows(%20prevzeros%20)%3B%0A%20%20For(%20i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Rows(%20zeros%20)%2C%20i%20%2B%3D%201%2C%0A%20%20%20If(%20zeros%5Bi%2C%203%5D%20!%3D%20i%2C%0A%20%20%20%20Throw(%20%22basin%20index%20assumption%20wrong%22%20)%0A%20%20%20)%3B%20%2F%2F%20zeros%20are%20sorted%20by%20basin%20number%0A%20%20%20%7Bindx%2C%20dist%7D%20%3D%20kdt%20%26lt%3B%26lt%3B%20knearestrows(%202%2C%20zeros%5Bi%2C%201%20%3A%3A%202%5D%20)%3B%0A%20%20%20If(%20N%20Cols(%20dist%20)%20%26gt%3B%201%20%26amp%3B%20dist%5B1%5D%20%26lt%3B%20dist%5B2%5D%20%2F%2010%2C%20%2F%2F%20assume%2010X%20closer%20is%20a%20good%20match%0A%20%20%20%20newbasin%5Bi%5D%20%3D%20indx%5B1%5D%3B%0A%20%20%20%20kdt%20%26lt%3B%26lt%3B%20removerows(%20indx%5B1%5D%20)%3B%2F%2F%0A%20%20%20%2C%20%2F*else*%2F%20!toomany%2C%20%2F%2F%20if%20there%20are%20toomany%20new%20zeros%2C%20don't%20assign%20them%20this%20way%0A%20%20%20%20newbasin%5Bi%5D%20%3D%20indx%5B1%5D%3B%0A%20%20%20%20kdt%20%26lt%3B%26lt%3B%20removerows(%20indx%5B1%5D%20)%3B%0A%20%20%20)%3B%0A%20%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26lt%3B%3CKNEARESTROWS%20%E3%81%AF%3D%22%22%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F*%0Azerobasin%20newbasin%0A%20%20%20%20%20%20%20%201%204%20change%201s%20to%204s%20in%20basinArray%20and%20zeros%0A%20%20%20%20%20%20%20%202%203%202s%20to%203s%0A%20%20%20%20%20%20%20%203%2010001%20too%20many%20case!%20no%20basin%20assigned.%20becomes%207%2C%20below%0A%20%20%20%20%20%20%20%204%202%0A%20%20%20%20%20%20%20%205%205%0A%20%20%20%20%20%20%20%206%206%0A%20%20%20%20%20%20%20%207%201%0A*%2F%0A%20%20unassigned%20%3D%20Loc(%20newbasin%20%26gt%3B%2010000%20)%3B%0A%20%20If(%20N%20Rows(%20unassigned%20)%20%26gt%3B%200%2C%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FKNEARESTROWS%3E%3C%2FP%3E%3CP%3E%E6%96%B0%E3%81%97%E3%81%84%E5%86%99%E7%9C%9F%E3%81%AB%E3%81%AF%E5%8F%A4%E3%81%84%E5%86%99%E7%9C%9F%E3%82%88%E3%82%8A%E3%82%82%E5%A4%9A%E3%81%8F%E3%81%AE%E3%82%BC%E3%83%AD%E3%81%8C%E3%81%82%E3%82%8A%E3%80%81%E3%81%9D%E3%82%8C%E3%82%89%E3%82%92%E6%9C%80%E5%BE%8C%E3%81%AE%E7%9B%86%E5%9C%B0%E3%81%AB%E5%85%A5%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20%20newbasin%5Bunassigned%5D%20%3D%20newbasin%5Bunassigned%5D%20-%2010000%20%2B%20N%20Rows(%20zeros%20)%0A%20%20)%3B%0A%20%20basinArray%20%3D%20Shape(%20newbasin%5BbasinArray%5D%2C%20N%20Rows(%20basinArray%20)%2C%20N%20Cols(%20basinArray%20)%20)%3B%0A%20%20zeros%5B0%2C%203%5D%20%3D%20Shape(%20newbasin%5Bzeros%5B0%2C%203%5D%5D%2C%20N%20Rows(%20zeros%20)%2C%201%20)%3B%0A%20%20ri%20%3D%20Rank%20Index(%20zeros%5B0%2C%203%5D%20)%3B%0A%20%20zeros%5B0%2C%200%5D%20%3D%20zeros%5Bri%2C%200%5D%3B%20%2F%2F%20zeros%20are%20sorted%20by%20basin%20number%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%82%BC%E3%83%AD%E3%81%AF%E4%B8%8A%E3%81%A7%E3%82%BD%E3%83%BC%E3%83%88%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E8%A1%8C%201%20%E3%81%AF%E8%89%B2%201%20%E3%82%92%E5%8F%96%E5%BE%97%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20prevzeros%20%3D%20zeros%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%83%93%E3%83%87%E3%82%AA%E3%82%92%E6%BB%91%E3%82%89%E3%81%8B%E3%81%AB%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E3%80%81%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88%E3%81%AE%E9%AB%98%E3%81%84%E7%94%BB%E5%83%8F%E3%81%AF%E7%A0%B4%E6%A3%84%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20countarray%5Bloc(countarray%26gt%3B200)%5D%20%3D%20200%3B%20%2F%2F%20150%20is%20typical%20big%20count%2C%20999%20is%20not%20converged%0A%20%20rangecount%20%3D%20Range(%20countarray%20)%3B%0A%20%20countarray%3Dcountarray-3%3B%20%2F%2F%203%20or%204%20is%20typical%20minimum%20count%2C%20make%20it%20bright%20(0)%0A%20%20countarray%5Bloc(countarray%26lt%3B0)%5D%3D0%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EGrayArray%20%E3%81%AF%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88%E3%81%8B%E3%82%89%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%AB%E3%81%95%E3%82%8C%E3%81%9F%E9%97%87%E3%81%A7%E3%81%99%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20grayArray%20%3D%20(1%20-%20(countArray%20%2F*-%20rangeCount%5B1%5D*%2F)%20%2F%20(200%20%2F*rangeCount%5B2%5D%20-%20rangeCount%5B1%5D*%2F))%20%5E%208%3B%0A%20%20rangebasin%20%3D%20range(basinarray)%3B%0A%20%20%2F%2FbasinArray%20%3D%20basinArray%20%2F%20(7)%3B%0A%20%20nc%3Dncols(colors)%3B%0A%20%20basinarray%5Bloc(basinarray%26gt%3Bnc)%5D%3Dncols(colors)%3B%20%2F%2F%20if%20these%20exist%20they%20could%20be%20mapped%20to%20gray%2C%20perhaps%0A%20%20basinarray%5Bloc(basinarray%26lt%3B1)%5D%3Dncols(colors)%3B%20%2F%2F%20ditto%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Egrey%20*%20redmap%5Bbasinarray%5D%20(%E3%81%AA%E3%81%A9)%20%E3%81%AF%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%AA%E3%83%B3%E3%82%B0%E3%81%95%E3%82%8C%E3%81%9F%20RGB%20%E3%82%AB%E3%83%A9%E3%83%BC%E3%82%B3%E3%83%B3%E3%83%9D%E3%83%BC%E3%83%8D%E3%83%B3%E3%83%88%E3%81%A7%E3%81%99%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20red%20%3D%20grayArray%20%3CLI-EMOJI%20id%3D%22lia_face-blowing-a-kiss%22%20title%3D%22%3Acara_que_env%C3%ADa_un_beso%3A%22%3E%3C%2FLI-EMOJI%3E%20shape(redmap%5Bbasinarray%5D%2C%20N%20Rows(%20basinArray%20)%2C%20N%20Cols(%20basinArray%20)%20)%3B%2F%2F(1%20%2B%20Sin(%202%20*%20Pi()%20*%20basinArray%20%2B%20(0%20*%202%20*%20Pi()%20%2F%203)%20))%20%2F%202%3B%0A%20%20green%20%3D%20grayArray%20%3CLI-EMOJI%20id%3D%22lia_face-blowing-a-kiss%22%20title%3D%22%3Acara_que_env%C3%ADa_un_beso%3A%22%3E%3C%2FLI-EMOJI%3E%20shape(greenmap%5Bbasinarray%5D%2C%20N%20Rows(%20basinArray%20)%2C%20N%20Cols(%20basinArray%20)%20)%3B%2F%2F(1%20%2B%20Sin(%202%20*%20Pi()%20*%20basinArray%20%2B%20(1%20*%202%20*%20Pi()%20%2F%203)%20))%20%2F%202%3B%0A%20%20blue%20%3D%20grayArray%20%3CLI-EMOJI%20id%3D%22lia_face-blowing-a-kiss%22%20title%3D%22%3Acara_que_env%C3%ADa_un_beso%3A%22%3E%3C%2FLI-EMOJI%3E%20shape(bluemap%5Bbasinarray%5D%2C%20N%20Rows(%20basinArray%20)%2C%20N%20Cols(%20basinArray%20)%20)%3B%2F%2F(1%20%2B%20Sin(%202%20*%20Pi()%20*%20basinArray%20%2B%20(2%20*%202%20*%20Pi()%20%2F%203)%20))%20%2F%202%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E0..1%20%E3%81%AE%E3%82%AB%E3%83%A9%E3%83%BC%E5%80%A4%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%90%E3%83%BC%E3%83%95%E3%83%AD%E3%83%BC%2F%E3%82%A2%E3%83%B3%E3%83%80%E3%83%BC%E3%83%95%E3%83%AD%E3%83%BC%E3%81%AE%E4%BF%AE%E6%AD%A3%E2%80%A6%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20red%5BLoc(%20red%20%26lt%3B%200%20)%5D%20%3D%200%3B%0A%20%20red%5BLoc(%20red%20%26gt%3B%201%20)%5D%20%3D%201%3B%0A%20%20green%5BLoc(%20green%20%26lt%3B%200%20)%5D%20%3D%200%3B%0A%20%20green%5BLoc(%20green%20%26gt%3B%201%20)%5D%20%3D%201%3B%0A%20%20blue%5BLoc(%20blue%20%26lt%3B%200%20)%5D%20%3D%200%3B%0A%20%20blue%5BLoc(%20blue%20%26gt%3B%201%20)%5D%20%3D%201%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%2B%20%E3%83%9E%E3%83%BC%E3%82%AB%E3%83%BC%E3%81%AF%E3%82%BC%E3%83%AD%E3%81%AE%E4%BD%8D%E7%BD%AE%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E2%80%A6%E7%B2%97%E9%9B%91%E3%81%A7%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%20%E3%82%A8%E3%83%83%E3%82%B8%E3%81%AB%E6%8F%8F%E7%94%BB%E3%81%97%E3%81%AA%E3%81%84%E3%81%A7%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%E8%A1%8C%E5%88%97%E3%81%AE%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E4%BB%98%E3%81%91%E3%81%A7%E3%81%AF%E3%80%81%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%81%8C%200%20%E3%81%AE%E8%A1%8C%E3%81%BE%E3%81%9F%E3%81%AF%E5%88%97%E5%85%A8%E4%BD%93%E3%81%8C%E5%AE%9F%E8%A1%8C%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20crosssize%20%3D%20floor(yresolution%20%2F%20100)%3B%0A%20%20For(%20iz%20%3D%201%2C%20iz%20%26lt%3B%3D%20N%20Rows(%20zeros%20)%2C%20iz%20%2B%3D%201%2C%0A%20%20%20real%20%3D%20Round(%20xresolution%20*%20Interpolate(%20Num(%20zeros%5Biz%2C%201%5D%20)%2C%20xleft%2C%200%2C%20xright%2C%201%20)%20)%3B%0A%20%20%20imag%20%3D%20Round(%20yresolution%20*%20Interpolate(%20Num(%20zeros%5Biz%2C%202%5D%20)%2C%20ytop%2C%200%2C%20ybottom%2C%201%20)%20)%3B%0A%20%20%20if(crosssize%2B5%20%26lt%3B%20imag%20%26lt%3B%20nrows(red)-crosssize-5%20%26amp%3B%20crosssize%2B5%20%26lt%3B%20real%20%26lt%3B%20ncols(red)-crosssize-5%2C%0A%20%20%20%20red%5Bimag%20-%201%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20red%5Bimag%20%2B%201%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20red%5Bimag%20-%202%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20red%5Bimag%20%2B%202%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20red%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20-%201%5D%20%3D%200.5%3B%0A%20%20%20%20red%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20%2B%201%5D%20%3D%200.5%3B%0A%20%20%20%20red%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20-%202%5D%20%3D%200.5%3B%0A%20%20%20%20red%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20%2B%202%5D%20%3D%200.5%3B%0A%0A%20%20%20%20green%5Bimag%20-%201%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20green%5Bimag%20%2B%201%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20green%5Bimag%20-%202%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20green%5Bimag%20%2B%202%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20green%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20-%201%5D%20%3D%200.5%3B%0A%20%20%20%20green%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20%2B%201%5D%20%3D%200.5%3B%0A%20%20%20%20green%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20-%202%5D%20%3D%200.5%3B%0A%20%20%20%20green%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20%2B%202%5D%20%3D%200.5%3B%0A%0A%20%20%20%20blue%5Bimag%20-%201%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20blue%5Bimag%20%2B%201%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20blue%5Bimag%20-%202%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20blue%5Bimag%20%2B%202%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%200.5%3B%0A%20%20%20%20blue%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20-%201%5D%20%3D%200.5%3B%0A%20%20%20%20blue%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20%2B%201%5D%20%3D%200.5%3B%0A%20%20%20%20blue%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20-%202%5D%20%3D%200.5%3B%0A%20%20%20%20blue%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%20%2B%202%5D%20%3D%200.5%3B%0A%0A%20%20%20%20red%5Bimag%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%201%3B%0A%20%20%20%20red%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%5D%20%3D%201%3B%0A%20%20%20%20green%5Bimag%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%201%3B%0A%20%20%20%20green%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%5D%20%3D%201%3B%0A%20%20%20%20blue%5Bimag%2C%20real%20-%20crosssize%20%3A%3A%20real%20%2B%20crosssize%5D%20%3D%201%3B%0A%20%20%20%20blue%5Bimag%20-%20crosssize%20%3A%3A%20imag%20%2B%20crosssize%2C%20real%5D%20%3D%201%3B%0A%20%20%20)%3B%0A%20%20)%3B%0A%20%20label%20%3D%20imgNumToLabel%5Bimagenumber%5D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%83%A9%E3%83%99%E3%83%AB%E3%81%AF%E4%B8%8B%E9%83%A8%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E3%83%A9%E3%83%99%E3%83%AB%E3%81%AE%E5%B0%8F%E3%81%95%E3%81%AA%E3%83%93%E3%83%83%E3%83%88%E3%83%9E%E3%83%83%E3%83%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%97%E3%80%81%E3%81%9D%E3%82%8C%E3%82%92%E5%A4%A7%E3%81%8D%E3%81%AA%E7%94%BB%E5%83%8F%E3%81%AB%E3%82%B3%E3%83%94%E3%83%BC%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20if(1%2C%0A%20%20%20%2F%2Flabel%20%3D%20char(imagenumber)%7C%7C%22%20zeros%3D%22%7C%7Cchar(N%20Rows(%20zeros%20))%7C%7C%22%20%20%22%7C%7Clabel%3B%0A%20%20%20labelpic%20%3D%20textbox(label%2Csetwrap(3000)%2C%26lt%3B%3CSETFONTSIZE%3E%3C%2FSETFONTSIZE%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E7%94%BB%E5%83%8F%E3%81%AF%E3%81%93%E3%81%A1%E3%82%89%E3%81%A7%E4%BD%9C%E6%88%90%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%20%E6%AC%A1%E3%81%AB%E3%80%81%E5%90%8D%E5%89%8D%E3%82%92%E4%BB%98%E3%81%91%E3%81%A6%E3%83%93%E3%83%87%E3%82%AA%E3%81%AB%E6%AE%8B%E3%81%99%E3%81%8B%E3%81%A9%E3%81%86%E3%81%8B%E3%82%92%E6%B1%BA%E5%AE%9A%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%20img%20%3D%20New%20Image(%20%22rgb%22%2C%20%7Bred%2C%20green%2C%20blue%7D%20)%3B%0A%20%20if(6%26lt%3B%3Dnrows(zeros)%26lt%3B%3D8%20%26amp%3B%202%26lt%3B%3Drangebasin%5B1%5D%26lt%3B%3D4%20%26amp%3B%206%26lt%3B%3Drangebasin%5B2%5D%26lt%3B%3D8%20%26amp%3B%203%26lt%3B%3Drangecount%5B1%5D%26lt%3B%3D4%20%26amp%3B%20rangecount%5B2%5D%26lt%3B200%2C%0A%20%20%20img%20%26lt%3B%26lt%3B%20saveimage(%20%22f%3A%2Fnewtonmethod%2Fpng3%2Fkeeper%22%20%7C%7C%20Char(%201e6%20%2B%20imagenumber%20)%20%7C%7C%20%22.png%22%2C%20%22png%22%20)%3B%0A%20%20%2C%0A%20%20%20img%20%26lt%3B%26lt%3B%20saveimage(%20%22f%3A%2Fnewtonmethod%2Fpng3%2Fzapped%22%20%7C%7C%20Char(%201e6%20%2B%20imagenumber%20)%20%7C%7C%20%22.png%22%2C%20%22png%22%20)%3B%0A%20%20)%3B%0A%20%20%2F%2Fimg%26lt%3B%3CSCALE%3E%3C%2FSCALE%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%81%9D%E3%82%8C%E3%81%A7%E3%81%8A%E3%81%97%E3%81%BE%E3%81%84%EF%BC%81%20%E3%81%93%E3%81%A1%E3%82%89%E3%81%8C%E3%83%93%E3%83%87%E3%82%AA%E3%81%A7%E3%81%99%E3%80%82%20%E7%A7%81%E3%81%AF%E3%80%81%E7%A7%91%E5%AD%A6%E7%9A%84%E3%81%AA%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%AE%E3%81%BF%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%AB%E6%B1%BA%E3%82%81%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E7%A7%91%E5%AD%A6%E7%9A%84%E3%81%AA%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%8C%E7%99%BA%E7%94%9F%E3%81%99%E3%82%8B%E7%AE%87%E6%89%80%E3%81%A7%E3%81%AF%E6%9A%97%E3%81%84%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%81%8C%E3%81%A1%E3%82%89%E3%81%A4%E3%81%8D%E3%80%81%E3%81%9D%E3%81%AE%E4%B8%8B%E3%81%AB%E3%81%AF%E5%BF%99%E3%81%97%E3%81%84%E3%82%AD%E3%83%A3%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%8C%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%20%E3%81%8D%E3%82%8C%E3%81%84%E3%81%AA%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%81%A7%E3%81%AF%E3%80%81%E3%82%88%E3%82%8A%E3%82%B9%E3%83%A0%E3%83%BC%E3%82%BA%E3%81%A7%E3%81%95%E3%82%89%E3%81%AB%E5%82%AC%E7%9C%A0%E7%9A%84%E3%81%AA%E3%82%82%E3%81%AE%E3%81%AB%E3%81%AA%E3%82%8B%E5%8F%AF%E8%83%BD%E6%80%A7%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%20%E3%83%8F%E3%83%BC%E3%83%89%E3%82%A6%E3%82%A7%E3%82%A2%E3%81%A8%E6%8E%A5%E7%B6%9A%E9%80%9F%E5%BA%A6%E3%81%8C%E3%81%82%E3%82%8C%E3%81%B0%E3%80%81%E3%81%93%E3%82%8C%E3%81%AF%204K%20%E3%83%93%E3%83%87%E3%82%AA%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81%E3%81%9D%E3%81%86%E3%81%A7%E3%81%AA%E3%81%84%E5%A0%B4%E5%90%88%E3%81%AF%20YouTube%20%E3%81%8C%E7%B8%AE%E5%B0%8F%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CDIV%20class%3D%22video-embed-center%20video-embed%22%3E%3CIFRAME%20class%3D%22embedly-embed%22%20src%3D%22https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252FAXaS-sw8NQc%253Ffeature%253Doembed%26amp%3Bdisplay_name%3DYouTube%26amp%3Burl%3Dhttps%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253DAXaS-sw8NQc%26amp%3Bimage%3Dhttps%253A%252F%252Fi.ytimg.com%252Fvi%252FAXaS-sw8NQc%252Fhqdefault.jpg%26amp%3Bkey%3Db0d40caa4f094c68be7c29880b16f56e%26amp%3Btype%3Dtext%252Fhtml%26amp%3Bschema%3Dyoutube%22%20width%3D%22400%22%20height%3D%22225%22%20scrolling%3D%22no%22%20title%3D%22%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%88%E3%83%B3%E6%B3%95%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%22%20allowfullscreen%3D%22true%22%3E%3C%2FIFRAME%3E%3C%2FDIV%3E%3CP%3E%3C%2FP%3E%3CP%3E%E3%81%93%E3%82%8C%E3%82%92%E6%8A%95%E7%A8%BF%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E6%99%82%E7%82%B9%E3%81%A7%E3%80%812020%20%E5%B9%B4%E3%82%82%E6%AE%8B%E3%82%8A%202%20%E6%99%82%E9%96%93%E3%81%A7%E3%81%99%E3%80%82%202021%E5%B9%B4%E3%81%8C%E3%81%A8%E3%81%A6%E3%82%82%E6%A5%BD%E3%81%97%E3%81%BF%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-345094%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22thumb.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22thumb.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22thumb.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22thumb.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22thumb.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F29152iDD8F474D9D70CD4D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22thumb.png%22%20alt%3D%22thumb.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E3%82%BC%E3%83%AD%E3%80%81%E8%A4%87%E7%B4%A0%E6%95%B0%E3%80%81%E5%BC%95%E5%8A%9B%E7%9B%86%E5%9C%B0%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%88%E3%83%B3%E6%B3%95%E3%80%81%E3%83%93%E3%83%87%E3%82%AA%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Choose Language Hide Translation Bar
Craige_Hales
Super User
Beowulf, Newton, and Mr Hanson

One day in 1971, Mr Hanson said “Today I’m going to teach you how to get the square root of a number. A faster way than the long-division way I’m supposed to teach. I’m going to teach you with one word. And you’ll never forget.” Then he writes on the chalkboard

Guess

and underlines it. When the laughter died down, he explained about dividing the guess into the the original number, average, repeat. He probably mentioned Newton-Raphson.

Newton’s method for finding roots or zeros of an equation uses the derivative of the equation to speed the process. The square root of 10 looks like finding a value of X that makes X^2 == 10 or X^2 – 10 == 0. The derivative of X^2 – 10 is 2X, and the heart of the loop for finding successive values of X is

Xnew = X - ( (X^2 - 10) / (2X) )

which, if you play with it, is exactly the guess formula, and converges like this, for an initial guess of 2:

2 – initial guess

3.5 – apply x = (x + 10/x)/2

3.17857142857143

3.16231942215088

3.16227766044414

3.16227766016838

3.16227766016838 – six iterations to a stable answer!

Here’s a JSL program to demonstrate.

f = Expr( x ^ 2 - V );
step = Eval Expr( x - Expr( Name Expr( f ) ) / Expr( Derivative( Name Expr( f ), x ) ) );

V = 1e2; // find the sqrt of V
x = -8; // initial guess. 

xnext = .; // set up loop
n = 0; // counter

While( 1,
	xnext = step;
	If( Abs( x - xnext ) < Abs( 1e-14 * x ),
		Break()
	);
	x = xnext;
	Write( "\!n", n, " ", x );
	n = n + 1;
);

Write( "\!ndone, a root of " || Char( Name Expr( f ) ) || " for V = " || Char( v ) || " is ", x );

The first line defines an expression, f, which will help find the square root of V. The second line, step, is the Newton-Raphson iteration for one cycle; step appears in the while loop where it evaluates to the next X value. The Derivative function works great on simple polynomials, giving 2X in this example. The NameExpr() gets the formula from f without evaluating it and the Expr() makes the NameExpr() run (to get the formula) when EvalExpr() finds the Expr(). Step is set to x - f(x)/f’(x).

Inside the while(1) loop, steps are taken and printed and counted. The test is checking the difference of the current and next X values; if the value is very small at the current size of X, it probably won’t get closer and might oscillate between two very close numbers, so it breaks out of the while loop.

0 -10.25

1 -10.0030487804878

2 -10.0000004646115

3 -10

done, a root of x ^ 2 - V for V = 100 is -10

Remember there is both a positive and a negative square root! Starting values determine which root the convergence leads to. Starting at -8 overshot to -10.25, then settled in to -10.

(Why does it divide by the derivative, f’ ? Intuitively, when the slope of the line f is close to zero, the next point will need to be further away to change the Y result of f, and dividing by the slope does that.)

The JSL above does not handle impossible requests well. If asked to find sqrt(-100), the JSL loops, looking for a complex number it is not equipped to find.

 

Complex Numbers

In the JSL scripting index, searching for complex produces two different half-baked examples. One is based on JSL classes and one based on namespaces and matrices. I think the matrix version is closer to a robust solution, and probably faster. The class version is tantalizing, but I had trouble using it (speed, memory issues). Since JMP does not have user overloads for operators, neither one is going to be easy to use.

This JSL is very similar to the previous JSL. There is a big chunk of code to handle the complex number arithmetic, the same formula, more-or-less, and now it handles sqrt(-100) too.

ns = New Namespace("complex", // adapted from scripting index example
	{
		make = Function( {a, b}, a || b ),
		add = Function( {x, y, t=[0 0], u=[0 0], v=[0 0], w=[0 0]}, // an example has 5 terms
			if( Is Number( x ),x = x || 0);
			if( Is Number( y ),y = y || 0);
			x + y + t + u + v + w;
		),
		sub = Function( {x, y, t=[0 0], u=[0 0], v=[0 0], w=[0 0]}, // an example has 3 terms. this sub,add trick is good enough for a demo.
			if( Is Number( x ),x = x || 0);
			if( Is Number( y ),y = y || 0);
			x - y - t - u - v - w;
		),
		mul = Function( {x, y},
			if( Is Number( x ),x = x || 0);
			if( Is Number( y ),y = y || 0);
			local:z = J( 1, 2 );
			local:z[1] = x[1] * y[1] - x[2] * y[2];
			local:z[2] = x[1] * y[2] + x[2] * y[1];
			local:z;
		),
		div = Function( {x, y},
			if( Is Number( x ),x = x || 0);
			if( Is Number( y ),y = y || 0);
			local:z = J( 1, 2 );
			local:d = (y[1] ^ 2 + y[2] ^ 2);
			local:z[1] = (x[1] * y[1] + x[2] * y[2]) / local:d;
			local:z[2] = (x[2] * y[1] - x[1] * y[2]) / local:d;
			local:z;
		),
		// https://math.stackexchange.com/questions/1397437/formula-for-raising-a-complex-number-to-a-power
		// If a,b are real, then a+ib=r(cosθ+i*sinθ) where r^2=a^2+b^2 and tanθ=b/a, and (a + i*b)^N = r^N(cos(Nθ) + i*sin(Nθ))
		pow = function( {c, n},
			if( Is Number( c ),c = c || 0);
			local:a = c[1];
			local:b = c[2];
			local:theta = ATan( local:b, local:a );
			local:r = Sqrt( local:a ^ 2 + local:b ^ 2 );
			local:r ^ n * (Cos( n * local:theta ) || Sin( n * local:theta ));
		),
		abs = function( {x},
			Sqrt( x[1] ^ 2 + x[2] ^ 2 )
		),
		toChar = Function( {x,w=20,d=14}, // rounding (to 14 places) is not a good idea if the numbers are small ( 1e-9 will lose lots of precision)
			Char( round(x[1],d),w ) || "+" || Char( round(x[2],d),w ) || "i"
		),
		convertExpression = function( {e},
			substitute( Name Expr( e ),
				Expr( Add() ), Expr( complex:add() ),
				Expr( Subtract() ), Expr( complex:sub() ),
				Expr( Multiply() ), Expr( complex:mul() ),
				Expr( Divide() ), Expr( complex:div() ),
				Expr( Power() ), Expr( complex:pow() )
			)
		)
	}
);

Above added a pow() function for x^2 or x^3 etc where x is a complex number, an abs() function which maybe should be called magnitude() but matches up with the non-complex version as abs, some odd-looking extra parameters to add() and sub(), and a convertExpression() function. Big shout-out to stackexchange/Michael Hardy for an easy-to-grasp pow() function!

The convertExpression function massages a JSL expression with +, -, *, /, and ^ operators into an equivalent expression that calls the complex namespace functions. The JSL binary operators are pretty aggressive about turning ((a+b)+(c+d)) into add(a,b,c,d) which is not a binary function...it has four arguments. That’s why there are extra option arguments on the complex:add and :sub functions.

Next bit of JSL moves the loop into a function, anticipating future development:

findzero = function( {x},
	{xnext, n},
	xnext = .; // set up loop
	n = 0; // counter

	While( n < 200,
		xnext = step;
		If( complex:Abs( complex:sub( x, xnext ) ) < 1e-14 * complex:abs( x ),
			Break()
		);
		x = xnext;
		n = n + 1;
	);
	If( n == 200, x = [. .] );

	Eval List( {x, n} );
);

findzero takes a starting point x and returns a list with the iterated solution x and the iteration count n.

And the code to call the function…the formula and derivative are the same for complex numbers.

f = Expr( x ^ 2 - V );
step = Eval Expr( x - Expr( Name Expr( f ) ) / Expr( Derivative( Name Expr( f ), x ) ) );
step = complex:convertExpression( Name Expr( step ) );

V = complex:make( -100, 0 ); // find the sqrt of V==-100
x = complex:make( 0, 1 ); // initial guess. Does not like 0i for a start value.

{x, n} = findzero( x );

Write( "\!ndone, a root of " || Char( Name Expr( f ) ) || " for V = " || complex:toChar( v, 10, 5 ) || " is ", complex:toChar( x, 10, 5 ) );
Eval( complex:convertExpression( Name Expr( f ) ) );

The 3rd line calls the convertExpression function to change the +, -, *, /, ^ operators from the real number versions to the complex number versions. V is set to a complex value and the initial starting point is set to a point off the real number line. When done, the log shows

done, a root of x ^ 2 - V for V = -100+0i is 0+10i

[0 0]

V=-100 + 0i is the real number -100 (with no imaginary component.) 0 + 10i is the pure imaginary answer with no real component; 10i * 10i is 100*(i^2), or -100, as expected. The complex roots occur in conjugate pairs; Newton’s method found one based on the starting point. The other one is at -10i.

Let’s modify the code to keep track of the iteration count n for a bunch of points in the complex plane and graph that, perhaps as a contour plot, and use cubic instead of quadratic:

f = Expr( x ^ 3 - V );
step = Eval Expr( x - Expr( Name Expr( f ) ) / Expr( Derivative( Name Expr( f ), x ) ) );

step = complex:convertExpression( Name Expr( step ) );

V = complex:make( -2, 0 ); // find the sqrt of V==-2

dt = New Table( "complex",New Column( "xre" ),New Column( "yim" ),New Column( "iterations" ),New Column( "basinr" ),New Column( "basini" ));
stepsize=1/32;
for(xreal=-2,xreal<=2,xreal+=stepsize,
	for(yimag=-2,yimag<=2,yimag+=stepsize,
		x = complex:make( xreal, yimag ); // initial guess. Does not like 0i for a start value.
		{x, n} = findzero( x );
		dt<<addrows(1);
		dt:xre=xreal;
		dt:yim=yimag;
		dt:iterations = n;
		dt:basinr = x[1];
		dt:basini = x[2];
	);
	write(xreal);wait(0);
);

dt<<Graph Builder(
	Size( 941, 911 ),
	Show Control Panel( 0 ),
	Variables(
		X( :xre ),
		Y( :yim ),
		Color( Transform Column( "basin", Formula( 100 * round(:basini,2) + round(:basinr,2) ) ) ),
		Size( :iterations )
	),
	Elements( Points( X, Y, Legend( 62 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				62,
				Properties( 0, {Marker Size( 4 )}, Item ID( "iterations", 1 ) ),
				Properties(
					1,
					{gradient( {Color Theme( "jet" )} )},
					Item ID( "basin", 1 )
				)
			)}
		)
	)
);

All the points in the complex plane that iterate to the same root form a basin. Above, graph builder combines the real and imaginary values into a single value to identify a root.

The image shows the three basins in red, cyan, and dark blue. All the red starting points converge to the same value. The larger dot sizes take longer to converge. The gray spots did not converge after 200 iterations:

Three basins. Larger dots where the basins touch take longer to converge.Three basins. Larger dots where the basins touch take longer to converge.

Doubling the size of the image from 16K to 65K points takes 10 minutes or so with the JSL complex number implementation. I want to make 10,000 bitmaps of 4Kx2K points, so I need another approach.

 

Beowulf Cluster

A Beowulf Cluster is a pile of old computers, mostly without displays or keyboards, but connected on a LAN to a controlling computer. In my case, the controlling computer uses JSL to tell the cluster what to do and to gather the results. The Linux-based cluster is running Python programs that JMP creates. The Windows computer running JMP uses PLINK from RunProgram to open one or more SSH sessions on each computer and supply the needed program and parameters. The Python program runs, then stores the results on a NFS disk, then exits. When JMP sees the RunProgram terminate, it gathers the results and starts the next RunProgram. 10,000 RunPrograms later there are enough images to make a five minute video.

Ethernet hub in center, below power-strip. Not enough mice and monitors and keyboards, SSH is best.Ethernet hub in center, below power-strip. Not enough mice and monitors and keyboards, SSH is best.

Python has a native complex number data type, so some of the JSL above goes away. The JSL now looks like this; you’ll see some Python embedded as a string in a bit.

F = Expr( // f and e parameters are driven by the frame animation time
	f6 * xOld ^ e6 + f5 * xOld ^ e5 + f4 * xOld ^ e4 + f3 * xOld ^ e3 + f2 * xOld ^ e2 + f1 * xOld ^ e1 - 1
); // <<<<<<<<<<< supply equation here <<<<<<<<<<<<<<
scale = 2 / 1;
xresolution = 1920 * scale;
yresolution = 1080 * scale;
// keep aspect ratio by chopping shorter dimension...

xcenter = -1;
ycenter = 0;
delta = 3;
ytop = ycenter - delta * yresolution / xresolution;
xleft = xcenter - delta;
xright = xcenter + delta;
ybottom = ycenter + delta * yresolution / xresolution;

The bit above includes the equation and some video size parameters. The bit below describes the network. Hostkey, server, cpus, running, gigs are indexes into the condat (connection data) list of information about the cluster.

// named indexes for condat
hostkey = 1; // from a failed connection, this makes the connection work
server = 2; // the machine names
cpus = 3; // from the lscpu command, below
running = 4; // dynamic: how many are running on this cpu, right now
gigs = 5; // from the free command, below

// the avahi-daemon may need to be stop/start/status sometimes,
// unfortunately that is hard to do except at server keyboard if you can't connect...

The problem with the daemon still exists, but I now know it is advertising the machines with a -2 (etc) suffix and I can fix it without connecting a display.

condat = {
{"4e:c3:8a:3b:e7:d4:bd:0d:85:62:36:40:17:15:b4:a3", "dell790a.local", 4, 0, 22},
{"00:c2:37:09:dc:d7:cf:fb:33:e3:14:e3:d6:fb:39:be", "dell790b.local", 4, 0, 14},
{"54:c8:1a:6a:50:e3:51:02:ed:1b:f8:fa:bd:f4:e4:17", "dell7010a.local", 8, 0, 30},
{"66:0d:ca:3c:1f:11:eb:45:d4:92:d0:0b:ae:01:b8:6b", "dell7010b.local", 8, 0, 30},
{"94:84:2f:a5:56:2d:db:16:b5:80:a9:0d:87:07:ee:53", "dell9010.local", 8, 0, 30},
{"b2:b7:b3:c3:83:63:11:e7:56:e7:c9:c2:e6:fc:f0:c9", "thinkb.local", 8, 0, 30},
{"2b:ca:fc:45:f0:64:cd:ac:70:ce:93:73:e8:84:2d:75", "thinkc.local", 8, 0, 30},
{"62:b7:67:23:8d:86:fe:80:1a:62:ec:d8:41:1b:b4:1b", "thinkd.local", 8, 0, 30},
{"8e:54:ee:b0:25:67:b8:5c:4d:ad:5e:e9:71:87:fd:71", "netflix.local", 2, 0, 30} // host for vm
};

The JSL below looks through the condat list and converts the names like dell9010 into their dotted IP address (or IPV6 equivalent.) It prevents lookup failures later; the cluster ran for about three days and I’m still not sure why my wife’s desktop is providing the DNS lookup service…Before I remembered GetAddrInfo I used the commented ping code, which is a bit clumsier. My house is a lot happier with IPV6 now than it was a few years back. Sometime the IPV6 address belongs in square brackets.

// on my local network, the lookups for xxx.local fail randomly,
// and more often when busy. pre-lookup the dotted ip now.
//
// better way? Get Addr Info( "thinkd.local" )[3][4]
//
for( itry = 1, itry < 10, itry += 1,
	nprocs = 0;
	MAXCPU = 0;
	good = 0;
	for( iCondat = 1, iCondat <= N Items( condat ), iCondat += 1,
		nprocs += condat[iCondat][cpus]; // nprocs will divide up the work (stepsize)
		condat[iCondat][running] = 0;
		MAXCPU = Max( MAXCPU, condat[iCondat][cpus] ); // MAXCPU loops needed later
		if( Starts With( condat[iCondat][server], "[" ),
			good += 1, // else
			//			txt = Run Program(
			//				Executable( "PING.EXE"/*path probably not needed*/ ),
			//				Options( {"-n 1", condat[iCondat][server]} ),
			//				ReadFunction( "text" )
			//			);
			//			ip = Regex( txt, "\[\[([^]]+)\]]\", "\0" ); // typ: [2603:6081:1a02:1200:8973:e7be:605c:f753]
			try(
			ip = "[" || Get Addr Info( condat[iCondat][server] )[3][4] || "]";
				if( !Is Missing( ip ),
					Write( "\!n", condat[iCondat][server] || " --> " || ip );
					condat[iCondat][server] = ip;
					good += 1;
				, //
					Write( "\!n", condat[iCondat][server] || " lookup failed ", Left( txt, 70 ) )
				); //
			, // catch
				show(exception_msg,iCondat,condat[iCondat][server],Get Addr Info( condat[iCondat][server] ));
			);
		);
	);
	if( good == N Items( condat ),
		Break(),
		Wait( .1 )
	);
);
Write( "\!n",good," of ", N Items( condat )," names resolved." );

The next bit is about credentials: the ppk is the JMP machine’s pivate key. The public part of that key is on each machine in the cluster. Plink needs that private bit to sign the SSH connection to the remote machine. The if(0) code is there so I can experiment on all the machines. At the end of the day, I might send them all the shutdown command. Be careful with the shutdown command if the condat list holds the Linux machine that is running the VirtualBox that is running this JSL script (line 9 above.)

remoteuser = "c@";
localkey = " -i c:\Users\v1\Desktop\keys\private.ppk ";

// test code examples...
if( 0, // sequential test using command
	//command = " \!"python3.6 -m pip install numpy"; 
	//command = " \!"python3.6 -m pip --version"; 
	//command = " \!"python3.6 -m pip install -U pip"; 

	//command = " \!"python3.6 --version"; 
	command = " \!"hostname -A"; 
	command = " \!"top -b -n 2|head -n 15"; 

	// check if the common nfs mount is set up
	//command = " \!"ls /mnt/nfsc"; // fstab: closet.local:/mnt/nfs /mnt/nfsc/ nfs defaults 0 0

	// cycle the power; -r means restart. for this to work, must be sudo and not need password
	//command = " \!"sudo shutdown -r now"; // visudo: c ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown
	//command = " \!"sudo shutdown  now"; // visudo: c ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown

	// info about number of cores
	//command = " \!"lscpu | egrep '^(Model name|Thread|CPU\(s\):)'";

	// info about memory
	//command = " \!"free -h";

	for( iCondat = 1, iCondat <= N Items( condat ), iCondat += 1,
		result = runprogram(
			executable( "plink" ),
			options(
				localkey || 
	/**/				" -hostkey " || condat[iCondat][hostkey] || /* this line hides the host key */
				" " || remoteuser || condat[iCondat][server] || command
			),
			write function( Function( {this}, this << Write( "n\r\n" ) ) ),
			readfunction( "blob" )
		);
		result = Regex( Blob To Char( result ), "(\r\n)+", "\r\n", GLOBALREPLACE );
		Write( "\!n\!n", iCondat, " ", condat[iCondat][server], " ", result );
		Wait( 0 );
	);
	Write( "\!n\!ntest done" );
);

The next bit is about running many copies of RunProgram concurrently. ImgNum is the key for each of these associative arrays and is the number of the image the Python program should be working on. ImgNumToRP holds a RunProgram object that is running. That object is moved to imgNumToRPdone as it is terminating. imgNumToResult holds the text output of the Python program, imgNumToMachine the id of the machine and imgNumToLabel a label for the picture. (The labels are applied later, more below.)

imgNumToRP = [=> ];  // holder for active RunProgram objects
imgNumToRPdone = [=> ]; // holder for RunProgram objects that need a moment to terminate
imgNumToRPresult = [=> ""]; // result strings from RunProgram objects
imgNumToMachine = [=> 0]; // which machine is this running on?
imgNumToLabel = [=>""]; // f(x) labels for graphs

nextImageNumberToMakePicture = 0;
// also: keep track of zeros from previous image

The unstick function handles the RunPrograms that don’t call the ReadFunction one last time after RunProgram terminates.

unstick = function({},{imagenumber},
	for( imagenumber = imgNumToRP << first, !Is Empty( imagenumber ), imagenumber = imgNumToRPnext,
		imgNumToRPnext = imgNumToRP << next( imagenumber );
		if( (imgNumToRP[imagenumber]) << canread == 0 & (imgNumToRP[imagenumber]) << canwrite == 0 & (imgNumToRP[imagenumber]) << isreadeof == 1,
			imgNumToRPresult[imagenumber] = "\!n" || char(imagenumber) || ": " || imgNumToRPresult[imagenumber] || "\!n";  // NoInterleave save this with count and basin
			imgNumToRPdone[imagenumber] = imgNumToRP[imagenumber];
			imgNumToRP << removeitem( imagenumber );
			//if(imgNumToMachine[imagenumber]!=machine,throw("b machine not match"||char(machine)||","||char(imgNumToMachine[imagenumber])));
			condat[imgNumToMachine[imagenumber]][running] = condat[imgNumToMachine[imagenumber]][running] - 1;
			imgNumToMachine[imagenumber] = 0;
			try(
				write("\!nunsticking ",imagenumber);
				process( imagenumber ); // must be after...
			,
				show(exception_msg);
			);
			Break(); // restart with <<first
		);
	);
);

The findmachine function below looks for a machine that doesn’t have too many SSH sessions started. The unstick() function is called periodically to look for the 10% of cases that get stuck.

findMachine = function( {},{iCondat,n}, // find a machine that is not filled up
	n=0;
	while( 1,
		for( iCondat = 1, iCondat <= N Items( condat ), iCondat += 1,
			if( condat[iCondat][running] < condat[iCondat][cpus],
				Return( iCondat )
			)
		);
		if(mod(n+=1,60)==0,
			write("wait for machine...");
			// look for stuck
			unstick();				
		);
		Wait( 1 ); // a full second is fine; the processes run for 10s of seconds
	)
);

The process function is called when JMP detects a RunProgram has finished. The Python programs write “sentinel” at the end of their output and this code checks for it as a crude check that everything is running smoothly. Bindata is the binary file the Python programs produce in the farm directory on the NFS disk. Windows and JMP see the NFS disk at the \\VBOXSVR path but Linux and the Python programs see it at the //mnt path. This code was going to produce the pictures from the binary data but that was separated into a post processing step. Now it just reports the number of zeros discovered for the formula. The binary format is explained in the python code; JMP reads it and loads it with blobtomatrix, used twice here. The relaunch at the end probably works if uncommented and needed; I forgot to uncomment it and didn’t need it.

// process output from one thread in the farm
process = function( {imagenumber},
	{bindata, start, stop, balanceBytes, matdata, countArray,basinArray,zeros}, 
	//show("process",imagenumber);
	if( Contains( imgNumToRPresult[imagenumber], "sentinel" ), 
		// process a file. maybe not this one if it is out of order... FIXME...nextImageNumberToMakePicture
		bindata = Load Text File( "\\VBOXSVR\nfsc\farm\binary" || char(imagenumber) || ".generated", blob() );
		matdata = blobtomatrix(
			bindata,
			"uint",
			2,
			"little",
			2
		);
		
		countArray = J( yresolution, xresolution, 0 );
		basinArray = J( yresolution, xresolution, 0 );

		countArray[0] = matdata[1::nrows(countArray)*ncols(countArray), 1];
		basinArray[0] = matdata[1::nrows(countArray)*ncols(countArray), 2]; 
		balanceBytes = length(bindata) - 4*nrows(countArray)*ncols(countArray);
		zeros = blobtomatrix(blobpeek(bindata,length(bindata)-balanceBytes),"float",8,"little",4);
		write("\!nimagenumber=",imagenumber, if(!ismatrix(zeros)," zeros ***"," zeros="||char(nrows(zeros))));
		deletefile("\\VBOXSVR\nfsc\farm\testpython"||char(imagenumber)||".py"); // source no longer needed
		sentinels += 1;//
	, // else
		Write( imgNumToRPresult[imagenumber] );
		Write( "\!nrelaunch disabled" || char(imagenumber) );
		//launch( imagenumber );
	)
);

The launch function starts another RunProgram. It uses findmachine to wait for an available machine, and supplies a custom .py file and custom parameters to the Python command. The .py file is created further below. The throw on line 5 below is a sanity check; the JSL is complicated enough I felt like I needed to write some extra code to watch for logic errors.

// launch a thread in the farm
launch = function( {imagenumber},{command,machine},
	machine = findMachine();
	//show("launch",imagenumber,machine);
	if(imgNumToMachine[imagenumber]!=0,throw("image number already on machine"||char(imagenumber)||","||char(machine)));
	imgNumToMachine[imagenumber] = machine;
	condat[machine][running] = condat[machine][running] + 1;
	//command = "\[python3 /mnt/nfsc/farm/testpython]\"||char(imagenumber)||"\[.py]\";
	command = "\[hostname -A;python3 /mnt/nfsc/farm/testpython]\"||char(imagenumber)||"\[.py]\";
	imgNumToRP[imagenumber] = runprogram(
		executable( "plink" ),
		options(
			localkey || /* -v */ " -hostkey " || condat[machine][hostkey] || " " || remoteuser || condat[machine][server] || " " || command || // 
			" -o " || Char( 0 ) || // offset
			" -s " || Char( 1 ) || // step
			" -x " || Char( xresolution ) || //
			" -y " || Char( yresolution ) || //
			" -t " || Char( ytop ) || //
			" -l " || Char( xleft ) || //
			" -r " || Char( xright ) || //
			" -b " || Char( ybottom ) || //
			" -f " || "/mnt/nfsc/farm/binary" || char(imagenumber) || ".generated" || //
			""
		),

The parameter keyword makes its argument available to the readfunction. This is how you can have multiple RunPrograms in parallel, and make the read functions know which one they are.

		Parameter( evallist({imagenumber,machine}) ),

The readfunction captures output and tries (about 90% of the time successful) to detect the RunProgram is finished. Because the RunProgram is still terminating and still running when this code runs, the handle is moved to imgNumToRPDone rather than just being removed. That allows it to finish cleanly. Parm, below, receives the Parameter value, above. There is another sanity check (throw) below.

		readfunction(
			function( {this, parm}, {txt, imagenumber,machine},
				{imagenumber,machine} = parm ;
				//show("readfunc",imagenumber,machine);
				txt = "";
				//write("readfun("||char(imagenumber)||")... ");
				While( this << canread, txt = txt || (this << read) );
				if( Length( txt ) > 0,
					//show(txt);
					imgNumToRPresult[imagenumber] = imgNumToRPresult[imagenumber] || txt
				);
				if( this << isreadeof & imgNumToRP << Contains( imagenumber ), // this *almost* always works, about 1:100 fail to get the readeof in the readrunction
					imgNumToRPresult[imagenumber] = "\!n" || char(imagenumber) || ": " || imgNumToRPresult[imagenumber] || "\!n";  // NoInterleave save this with count and basin
					process( imagenumber );
					imgNumToRPdone[imagenumber] = imgNumToRP[imagenumber];
					imgNumToRP << removeitem( imagenumber );
					if(imgNumToMachine[imagenumber]!=machine,throw("a machine not match"||char(machine)||","||char(imgNumToMachine[imagenumber])));
					condat[machine][running] = condat[machine][running] - 1;
					imgNumToMachine[imagenumber] = 0;
				);
			)
		)
	);
	(imgNumToRP[imagenumber]) << writeeof;

);

The makePythonCode function generates the .py file with the oneStep equation baked in. The python program includes an init() function that parses the command line to get picture size and output file name info. Data is being passed in two ways: command line parameters, and baked in equations. Possibly all of the information could have been baked in, but if there is no reason (like compiling the oneStep equation into the code) to bake parameters into the code, you’d only need one copy of the code for all the RunPrograms if it was completely controlled by command line parms. The Python code is written so it can do a slice of the problem if I wanted multiple computers working on a single image. It is faster overall to do a complete image at once and not recombine parts later.

makePythonCode = function({imagenumber,oneStep},{filename,python},
	python =
	"\[
import cmath, math, sys, getopt
import numpy as np


def main():
    
    offset, step, ixdim, iydim, top, bottom, left, right, filename = init()   # NoInterleave offset will be 0 and step will be 1
    iymax = iydim - 1
    ixmax = ixdim - 1
    yrange = top - bottom
    xrange = right - left

    result = np.zeros( (int(math.ceil((iydim*ixdim-offset)/step)),2),dtype=np.int16) # count, basin # NoInterleave simpler, no change required though
    iresult = 0

    ix = offset # NoInterleave like iy, now begins at zero
    iy = 0
    while ix > ixmax: # normalize before loop starts
        ix = ix - ixdim
        iy = iy + 1
    y = bottom + yrange * iy / iymax #  after iy is normalized, before loop

    roundedComplexToBasinId = {}
    basinIdToBasinSize = {} # NoInterleave this might be useful, but needs to be appended to file (now a constant size for main chunk)
    nextBasinId = 1 # reserve basin 1 for "did not converge"

    while iy <= iymax:
        x = left + xrange * ix / ixmax
        
        xOld = complex(x,y)    #xOld - (xOld ** 5 - 1) / (5 * xOld ** 4)
        count = 0
        try: ## catch zero divide, rarely
            for irun in range(1,1000): # NoInterleave prev stopped at 100
                ###xNew = xOld - (xOld ** 5 - 1) / (5 * xOld ** 4)
                ]\" || // maintain the indent and newlines!

The next line is the baked in bit…OneStep is a JSL character string of a valid Python statement that sets xNew from the xOld value and Newton’s equation, like the ### comment two lines above.

                oneStep || "\[ 
                count += 1
                delta = abs(xNew - xOld)
                dist = abs(xOld)
                if delta < 1e-15 * dist:
                    break
                xOld = xNew
            xOld = complex( round(xOld.real,10), round(xOld.imag,10) )
            if irun >= 999:
                basinId = 1 # arbitrary, but available always. did not converge.
            else:
                try: ## catch new basin discovered, rarely
                    basinId = roundedComplexToBasinId[xOld]
                except KeyError as e:
                    nextBasinId += 1
                    roundedComplexToBasinId[xOld] = nextBasinId
                    basinId = nextBasinId
                    basinIdToBasinSize[basinId] = 0
###            print(offset, count, xOld, basinId)
        except ZeroDivisionError as e:
            basinId = -1
###            print(offset, e)
        try:
            result[iresult,0] = count
        except:
            print("oops",ix,iy)
        if basinId >= 0:
            try:
                basinIdToBasinSize[basinId] += 1
            except KeyError as e:
                basinIdToBasinSize[basinId] = 1 # happens with basinId==1
        result[iresult,1] = basinId
        iresult += 1

        ix = ix + step # advance
###        offset = offset + step # needed for return value
        while ix > ixmax: # re-normalize
            ix = ix - ixdim
            iy = iy + 1
            y = bottom + yrange * iy / iymax

Here’s the python code that writes a binary file of integers and doubles. The doubles follow the integers to make it easy for JMP to grab everything with blobToMatrix.

# output results

    fileobj = open(filename, mode='wb') # NoInterleave maybe prepend a descriptor
    result.tofile(fileobj) # NoInterleave append after this constant size block
    # NoInterleave append roundedComplexToBasinId and basinIdToBasinSize rather than printing them, they should be same dimension
    # 4 8-byte doubles: real,imag,basin,size
    temp = np.zeros( (len(roundedComplexToBasinId),4),dtype=np.float64)
    itemp = 0
    for iz in roundedComplexToBasinId.keys():
        temp[itemp,0] = iz.real
        temp[itemp,1] = iz.imag
        temp[itemp,2] = roundedComplexToBasinId[iz]
        temp[itemp,3] = basinIdToBasinSize[roundedComplexToBasinId[iz]]
        itemp += 1
    temp.tofile(fileobj)
    fileobj.close()

    print("sentinel"); # so JSL can test if this ran to the end...
    
def init():
    offset = 0
    step = 1
    xdim = 3
    ydim = 2
    top = -1.0
    bottom = 1.0
    left = -1.0
    right = 1.0
    filename = "temp.binary"

    options, remainder = getopt.getopt(sys.argv[1:], 's:x:y:o:t:b:l:r:f:')
    for opt, arg in options:
        if opt == '-o':
            offset = int(arg) # offset is the starting point
        elif opt == '-s':
            step = int(arg) # step to the next point
        elif opt == '-x':
            xdim = int(arg) # xdim field int size
        elif opt == '-y':
            ydim = int(arg) # ydim field int size
        elif opt == '-t':
            top = float(arg) # top of field user coords
        elif opt == '-b':
            bottom = float(arg) # bot field user coords
        elif opt == '-l':
            left = float(arg) # left field user coords
        elif opt == '-r':
            right = float(arg) # right field user coords
        elif opt == '-f':
            filename = arg # write binary file

    print(" xdim=",xdim,
        " ydim=",ydim,
        " offset=",offset,
        " step=",step,
        " top=",top,
        " bottom=",bottom,
        " left=",left,
        " right=",right)
    return offset, step, xdim, ydim, top, bottom, left, right, filename

if __name__ == "__main__":
    main()
    
]\";

The Python program is saved to the NFS directory (as windows knows it) with a unique number. The returned file name is not used; the Linux version of the filename is created by the launch function and passed via Plink. (We are back in JSL now...)

	filename = Save Text File( "\\VBOXSVR\nfsc\farm\testpython"||char(imagenumber)||".py", python );  // NoInterleave - unique file name for each picture because the equation changes
	return(filename);
);

The loop below generated the 10,000 frames.

for( imagenumber = 0, imagenumber < 10000, imagenumber += 1, //<<<<< frame loop <<<<<<
	write("\!nloop",imagenumber);
	// for X^5 - 1 there are 5 roots; 1 real and 4 complex
	// the python expression for x(n+1) = x(n) - F / F' is
	// xNew = xOld - (xOld ** 5 - 1) / (5 * xOld ** 4)

The formula, and converting OneStep to a Python statement – this looks complicated because it is substituting actual values into the parameters F1...F6 and E1...E6. Hidden at the end is the change from JSL’s ^ to Python’s **, which is done in text, not expression, because JSL has no way to represent ** as an expression. The F1...E6 are handled as expressions. Sin( imagenumber / 200 ) is roughly 10 complete sine wave from -1 to 1. The sine waves are different frequencies because of the different divisors. The factors move smoothly from -2 to 2 and the exponents move smoothly about their 1...6 target by +/- 1. So the equation from one picture to the next is pretty similar, but varying a bit unpredictably.

	FF = Derivative( Name Expr( F ), xOld );
	// onestep will be inserted into python below
	oneStep = substitute( // "xNew = xOld - (xOld ** 5 - 1) / (5 * xOld ** 4)"
			char( // "xNew = xOld - (xOld ^ 5 - 1) / (5 * xOld ^ 4)"
				substitute( // char() adds the parens around F and FF
					Expr( xNew = xOld - F / FF ), // build the statement with symbols, then
					Expr( F ), Name Expr( F ), // replace F and FF symbols with the content
					Expr( FF ), Name Expr( FF ), // of the function and derivative
					Expr( F6 ), round(2 * Sin( imagenumber / (200+5) ) / 2,3),
					Expr( F5 ), round(2 * Sin( imagenumber / (200+7) ) / 2,3),
					Expr( F4 ), round(2 * Sin( imagenumber / (200+11) ) / 2,3),
					Expr( F3 ), round(2 * Sin( imagenumber / (200+13) ) / 2,3),
					Expr( F2 ), round(2 * Sin( imagenumber / (200+17) ) / 2,3),
					Expr( F1 ), round(2 * Sin( imagenumber / (200+19) ) / 2,3),
					Expr( E6 ), round(6.0 + Sin( imagenumber / (200+23) ) / 2,3),
					Expr( E5 ), round(5.0 + Sin( imagenumber / (200+29) ) / 2,3),
					Expr( E4 ), round(4.0 + Sin( imagenumber / (200+31) ) / 2,3),
					Expr( E3 ), round(3.0 + Sin( imagenumber / (200+37) ) / 2,3),
					Expr( E2 ), round(2.0 + Sin( imagenumber / (200+41) ) / 2,3),
					Expr( E1 ), round(1.0 + Sin( imagenumber / (200+47) ) / 2,3)
				) // sub F,FF
			), // char
		"^", "**"
	); // substitute ^ in JSL to ** in python

The imgNumToLabel associative array may be used later to label images. Simplify xOld->X...

	imgNumToLabel[imagenumber]=substitute(regex(oneStep,"xNew = xOld - \((.*?)\) / ","\1")," ** ","^"," * ","·","xOld","X");
	write("\!n",imgNumToLabel[imagenumber]);
	
	//"/mnt/nfsc/farm/binary" || char(imagenumber) || ".generated"

The test for an existing file was used during development to speed things along when the program had to be restarted. It may not work quite right, it was not used for the final run (three days!)

	if(fileexists("\\VBOXSVR\nfsc\farm\binary" || char(imagenumber) || ".generated"),
		write("Exists ","\\VBOXSVR\nfsc\farm\binary" || char(imagenumber) || ".generated");
		continue();
	);
	
	makePythonCode(imagenumber,oneStep);

This looks like out-of-place abandoned code.

	n = 0; // eventually this becomes the offset  // NoInterleave offset is always 0
	sentinels = 0; // NoInterleave "sentinel" might be all it returns
	//write("Launching... ");

This is where the 10,000 RunPrograms begin. 50 or 60 will be running at the same time using the condat values, way above.

	launch( imagenumber );
	write("Launched. ")
);

The wrap up...wait for the last few RunPrograms to end, unstick may find one or two.

while( N Items( imgNumToRP ) > 0,
	Wait( .1 );
	unstick(); 
);

write("\!ndone");

The labels get saved for the image generator, later. JSL/Python above already saved binary data that still needs conversion to .png format.

savetextfile("$desktop/imgNumToLabel.txt",char(imgNumToLabel));

The Rpdone is holding 10,000 terminated RunPrograms. Let it go.

imgNumToRPdone = 0;// clean out  // NoInterleave picture generation happens after all count and basin are created

The image generator can be run now, or later...

include("pythonFarmDisplay.jsl");

That’s the end of the Beowulf code. The picture generator could have used it, but didn’t. I want the video to use the same colors from one frame to the next. The colors represent basins of attraction, the zero that any point in the basin is attracted to should get the same color. But the equation changes, a little, on every frame, so the zeros are moving around. The picture generator tries to match up the zeros on the previous picture with the next picture. Sometimes they jump, but it is good enough.

The JSL to make the pictures follows. First make a color table for the basins. These are the lightest possible version of the color; they get darkened later by the iteration count being large.

colors=
hlscolor(0,L,1)|| // dark red
hlscolor(.05,L,0.8)|| // red
hlscolor(.15,L,0.9)|| // orn
hlscolor(.35,L,1.0)|| // yel
hlscolor(.50,L,1.0)|| // grn
hlscolor(.65,L,1.0)|| // cyn
hlscolor(.80,L,0.7)|| // blu
hlscolor(.95,L,1.0)|| // mag
hlscolor(1.0,L,0.0);  // gry
redmap=j(ncols(colors),1,0);
greenmap=j(ncols(colors),1,0);
bluemap=j(ncols(colors),1,0);
for(i=1,i<=ncols(colors),i+=1,
	{r,g,b}=colortorgb(colors[i]);
	m = max(r,g,b);
	redmap[i] = r/m;
	greenmap[i] = g/m;
	bluemap[i] = b/m;
);

The image labels saved earlier need reloading, picture dimensions need to match. This code should be the same as earlier, and should have been extracted into a common parameter file. Too late now!

imgNumToLabel=Include( "$desktop/pythonFarmDisplayLabels.jsl" );
scale = 2 / 1;
xresolution = 1920 * scale;
yresolution = 1080 * scale;
// keep aspect ratio by chopping shorter dimension...

xcenter = -1;
ycenter = 0;
delta = 3;
ytop = ycenter - delta * yresolution / xresolution;
xleft = xcenter - delta;
xright = xcenter + delta;
ybottom = ycenter + delta * yresolution / xresolution;

The colors for the basins are supposed to track across slightly different picures/equations. This is where the previous picture’s zeros live.

prevzeros = []; // what came before the first one

The NFS disk was way too small. There is 309GB of uncompressed pixel info here.

//filepat = "\\VBOXSVR\nfsc\farm\binary^imagenumber^.generated";
// manually moved the files (running out of space)...
filepat = "f:\newtonmethod\generated\binary^imagenumber^.generated";

countarray = J( yresolution, xresolution, 0 );
basinarray = J( yresolution, xresolution, 0 );

The binary files will be unpacked into two JSL matrices: a count of how many iterations the pixel needed, and a small integer identifying the pixel’s basin. There is a little more binary data after that (the balance bytes) that takes the basin number to a complex coordinate; the complex coordinate is what gets matched up from one picture to the next.

For( imagenumber = 1, imagenumber < 10000, imagenumber += 1,
	file = Eval Insert( filepat );
	If( File Exists( file ),
		bindata = Load Text File( file, blob() );
		matdata = Blob To Matrix( bindata, "uint", 2, "little", 2 );
		countArray[0] = matdata[1 :: yresolution * xresolution, 1];
		basinArray[0] = matdata[1 :: yresolution * xresolution, 2];
		balanceBytes = Length( bindata ) - 4 * yresolution * xresolution;
		zeros = Blob To Matrix( Blob Peek( bindata, Length( bindata ) - balanceBytes ), "float", 8, "little", 4 );
		//Show( zeros );
		if(zeros[1, 3]==2,
			zeros = [9e99 9e99 1 0] |/ zeros; // python code should have put this in
		);
		// re-assign the basin numbers to line up with prevzeros
		If( N Rows( prevzeros ) == 0,
			prevzeros = zeros
		);

The KDTable finds nearest neighbors; the complex plane is a fine neighborhood.

		kdt = KDTable( prevzeros[0, 1 :: 2] ); // 1::2 means the real and imag cols
		newbasin = (1 :: N Rows( zeros )) + 10000;
		toomany = N Rows( zeros ) > N Rows( prevzeros );
		For( i = 1, i <= N Rows( zeros ), i += 1,
			If( zeros[i, 3] != i,
				Throw( "basin index assumption wrong" )
			); // zeros are sorted by basin number
			{indx, dist} = kdt << knearestrows( 2, zeros[i, 1 :: 2] );
			If( N Cols( dist ) > 1 & dist[1] < dist[2] / 10, // assume 10X closer is a good match
				newbasin[i] = indx[1];
				kdt << removerows( indx[1] );//
			, /*else*/ !toomany, // if there are toomany new zeros, don't assign them this way
				newbasin[i] = indx[1];
				kdt << removerows( indx[1] );
			);
		);

The <<knearestrows picks the 2 nearest zeros from the old picture to the zero in the new picture. If the first one is at least 10X closer, or if the new picture doesn’t have more zeros than the older picture, the first zero returned is the one we want. When done, the newbasin describes how to rearrange the zeros to match up colors better.

/*
zerobasin newbasin
        1 4 change 1s to 4s in basinArray and zeros
        2 3 2s to 3s
        3 10001 too many case! no basin assigned. becomes 7, below
        4 2
        5 5
        6 6
        7 1
*/
		unassigned = Loc( newbasin > 10000 );
		If( N Rows( unassigned ) > 0,

The new pic has more zeros than the old pic, put them in the last basin.

			newbasin[unassigned] = newbasin[unassigned] - 10000 + N Rows( zeros )
		);
		basinArray = Shape( newbasin[basinArray], N Rows( basinArray ), N Cols( basinArray ) );
		zeros[0, 3] = Shape( newbasin[zeros[0, 3]], N Rows( zeros ), 1 );
		ri = Rank Index( zeros[0, 3] );
		zeros[0, 0] = zeros[ri, 0]; // zeros are sorted by basin number

The zeros are sorted above; row 1 gets color 1, etc.

		prevzeros = zeros;

The pictures with high counts are discarded to make the video smoother.

		countarray[loc(countarray>200)] = 200; // 150 is typical big count, 999 is not converged
		rangecount = Range( countarray );
		countarray=countarray-3; // 3 or 4 is typical minimum count, make it bright (0)
		countarray[loc(countarray<0)]=0;

The GrayArray is scaled darkness from the counts

		grayArray = (1 - (countArray /*- rangeCount[1]*/) / (200 /*rangeCount[2] - rangeCount[1]*/)) ^ 8;
		rangebasin = range(basinarray);
		//basinArray = basinArray / (7);
		nc=ncols(colors);
		basinarray[loc(basinarray>nc)]=ncols(colors); // if these exist they could be mapped to gray, perhaps
		basinarray[loc(basinarray<1)]=ncols(colors); // ditto

The gray * redmap[basinarray] (etc) is a scaled rgb color component

		red = grayArray :* shape(redmap[basinarray], N Rows( basinArray ), N Cols( basinArray ) );//(1 + Sin( 2 * Pi() * basinArray + (0 * 2 * Pi() / 3) )) / 2;
		green = grayArray :* shape(greenmap[basinarray], N Rows( basinArray ), N Cols( basinArray ) );//(1 + Sin( 2 * Pi() * basinArray + (1 * 2 * Pi() / 3) )) / 2;
		blue = grayArray :* shape(bluemap[basinarray], N Rows( basinArray ), N Cols( basinArray ) );//(1 + Sin( 2 * Pi() * basinArray + (2 * 2 * Pi() / 3) )) / 2;

The fixups for over/underflow the 0..1 color values…

		red[Loc( red < 0 )] = 0;
		red[Loc( red > 1 )] = 1;
		green[Loc( green < 0 )] = 0;
		green[Loc( green > 1 )] = 1;
		blue[Loc( blue < 0 )] = 0;
		blue[Loc( blue > 1 )] = 1;

The + markers are added at the zero locations… crude, but works. Don’t draw on the edge, matrix indexing does whole rows or columns for index of zero!

		crosssize = floor(yresolution / 100);
		For( iz = 1, iz <= N Rows( zeros ), iz += 1,
			real = Round( xresolution * Interpolate( Num( zeros[iz, 1] ), xleft, 0, xright, 1 ) );
			imag = Round( yresolution * Interpolate( Num( zeros[iz, 2] ), ytop, 0, ybottom, 1 ) );
			if(crosssize+5 < imag < nrows(red)-crosssize-5 & crosssize+5 < real < ncols(red)-crosssize-5,
				red[imag - 1, real - crosssize :: real + crosssize] = 0.5;
				red[imag + 1, real - crosssize :: real + crosssize] = 0.5;
				red[imag - 2, real - crosssize :: real + crosssize] = 0.5;
				red[imag + 2, real - crosssize :: real + crosssize] = 0.5;
				red[imag - crosssize :: imag + crosssize, real - 1] = 0.5;
				red[imag - crosssize :: imag + crosssize, real + 1] = 0.5;
				red[imag - crosssize :: imag + crosssize, real - 2] = 0.5;
				red[imag - crosssize :: imag + crosssize, real + 2] = 0.5;

				green[imag - 1, real - crosssize :: real + crosssize] = 0.5;
				green[imag + 1, real - crosssize :: real + crosssize] = 0.5;
				green[imag - 2, real - crosssize :: real + crosssize] = 0.5;
				green[imag + 2, real - crosssize :: real + crosssize] = 0.5;
				green[imag - crosssize :: imag + crosssize, real - 1] = 0.5;
				green[imag - crosssize :: imag + crosssize, real + 1] = 0.5;
				green[imag - crosssize :: imag + crosssize, real - 2] = 0.5;
				green[imag - crosssize :: imag + crosssize, real + 2] = 0.5;

				blue[imag - 1, real - crosssize :: real + crosssize] = 0.5;
				blue[imag + 1, real - crosssize :: real + crosssize] = 0.5;
				blue[imag - 2, real - crosssize :: real + crosssize] = 0.5;
				blue[imag + 2, real - crosssize :: real + crosssize] = 0.5;
				blue[imag - crosssize :: imag + crosssize, real - 1] = 0.5;
				blue[imag - crosssize :: imag + crosssize, real + 1] = 0.5;
				blue[imag - crosssize :: imag + crosssize, real - 2] = 0.5;
				blue[imag - crosssize :: imag + crosssize, real + 2] = 0.5;

				red[imag, real - crosssize :: real + crosssize] = 1;
				red[imag - crosssize :: imag + crosssize, real] = 1;
				green[imag, real - crosssize :: real + crosssize] = 1;
				green[imag - crosssize :: imag + crosssize, real] = 1;
				blue[imag, real - crosssize :: real + crosssize] = 1;
				blue[imag - crosssize :: imag + crosssize, real] = 1;
			);
		);
		label = imgNumToLabel[imagenumber];

The label is added at the bottom. Make a tiny bitmap of the label, then copy it into the bigger image.

		if(1,
			//label = char(imagenumber)||" zeros="||char(N Rows( zeros ))||"  "||label;
			labelpic = textbox(label,setwrap(3000),<<setfontsize(15));
			{labelpixr,labelpixg,labelpixb} = (labelpic<<getpicture)<<getpixels("rgb");
			tall=nrows(labelpixr);
			labelpixr = labelpixr[(tall/9)::(tall-tall/12),0]; // trim
			labelpixg = labelpixg[(tall/9)::(tall-tall/12),0]; // trim
			labelpixb = labelpixb[(tall/9)::(tall-tall/12),0]; // trim
			labelLeft = floor((ncols(red)-ncols(labelpixr))/2);
			labelRight = labelLeft + ncols(labelpixr) - 1;
			labelBottom = nrows(red);
			labelTop = labelBottom - nrows(labelpixr) + 1;
			red[labelTop::labelBottom, labelLeft::labelRight] = labelpixr;
			green[labelTop::labelBottom, labelLeft::labelRight] = labelpixg;
			blue[labelTop::labelBottom, labelLeft::labelRight] = labelpixb;
		);

The image is made here. Then decide if it will be kept in the video by naming it.

		img = New Image( "rgb", {red, green, blue} );
		if(6<=nrows(zeros)<=8 & 2<=rangebasin[1]<=4 & 6<=rangebasin[2]<=8 & 3<=rangecount[1]<=4 & rangecount[2]<200,
			img << saveimage( "f:/newtonmethod/png3/keeper" || Char( 1e6 + imagenumber ) || ".png", "png" );
		,
			img << saveimage( "f:/newtonmethod/png3/zapped" || Char( 1e6 + imagenumber ) || ".png", "png" );
		);
		//img<<scale(900/yresolution);
		//New Window( "rgb", img );

		write("\!n"||char(imagenumber)||" nz="||char(nrows(zeros))||" rb="||char(rangebasin)||" rc="||char(rangecount )||" " ||label);

		Wait( 0 );
	);
);

That’s it! Here’s the video. I decided to only make the scientific version, with flickering dark frames where they happen and a busy caption below. A pretty version could be smoother and even more hypnotic. It is a 4K video, if you have the hardware and connection speed, otherwise youtube will scale it down for you.

There's two hours of 2020 left as I post this. I'm really looking forward to 2021.

Last Modified: Jan 2, 2021 8:24 AM