Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806

2017-08-10 Thread Don Kelly
isn't an advantage of APL and J that the person writing a program/app/whatever, doesn't have to deal with the distinctions between integer and damn near integer within the limitations of the computer binary resolution?. In most cases this isa good thing because close enough -given the +/- of

Re: [Jprogramming] Integer-floating type change for large numbers in j805 and j806

2017-08-10 Thread Bill
I suspect J interpreter didn't has the knowledge that the original string had been .3 with .3 because what J saw was the floating point result of parsing by c library. Ieee floating point has 15 to 16 significant digits so that 1e16 and 1e16-1 is the same number. Perhaps one c

[Jprogramming] J and Jx

2017-08-10 Thread Jose Mario Quintana
Inline comments follow... > Just wondering why > > isgerund=: 3 : 0 :: 0 > y at .] > 1 > ) > > isn't an acceptable test for “gerundality”? ( I do not think so; I answered this question earlier in another post. ) > > I also kind of agree with Bill, in the sense that J doesn’t seem to h

Re: [Jprogramming] Multidimensional Root Finding with Newton Solver

2017-08-10 Thread Devon McCormick
There's also this - http://code.jsoftware.com/wiki/Scripts/nlls - an implementation of the Levenberg-Marquardt algo that I cribbed from someone who copied it from APL. On Thu, Aug 10, 2017 at 6:47 PM, Don Kelly wrote: > I also suggest that you look at references to the use of NR for power > syst

Re: [Jprogramming] Multidimensional Root Finding with Newton Solver

2017-08-10 Thread Don Kelly
I also suggest that you look at references to the use of NR for power system load flow problems which are non-linear and generally expressed in terms of complex numbers in the polar format. These do converge well. I haven't written one in J but one written in APL has 11 readable lines-most o

Re: [Jprogramming] Multidimensional Root Finding with Newton Solver

2017-08-10 Thread 'Bo Jacoby' via Programming
Solving many algebraic equations in many unknowns can be done by eliminating the unknowns one by one obtaining many algebraic equations in one unknown each, and then solving these equations numerically. Example: Two equations in two unknowns. 0 = (x^2)+(y^2)-16 = (y-2) .  0 = y-2 = y(y-2) = (y^2)

Re: [Jprogramming] Multidimensional Root Finding with Newton Solver

2017-08-10 Thread Louis de Forcrand
I find it interesting that N-R works for vectors and complex functions (and mixes of both). Just replace all those scalar functions by their vector equivalents: vn=: 1 : '- n * u %. u D.1' I added a scaling factor; it makes the convergence slower, but it fixes problems due to precision-loss.

Re: [Jprogramming] Fractional parts

2017-08-10 Thread Don Kelly
I agree with your contention on the basis that _3.15 = -(3.15) or _3 +_0.15 and your use of what I named fp1=:* * 1 | | does this For the real part rp1=: ] - fp1 v _2.375 _5.84615 _11.4 13.0028 13.0014 13 12.9986 fp1 v _0.375 _0.84615 _0.4 0.0028 0.0014 0 0.9986 rp1 v _2 _5 _11 13

Re: [Jprogramming] Multidimensional Root Finding with Newton Solver

2017-08-10 Thread Ian Clark
> Is it also possible to solve a system of equation like the following one… ? Basically, yes. Because not only can x = (x1,x2) be a vector, but so can y = (y1,y2) in this adaptation of your equations: y1 = a*(1-x1) y2 = b*(x2-x1^2) TABULA is an app (distributed as a JAL "addon") which employs

Re: [Jprogramming] apply iteratively

2017-08-10 Thread Raul Miller
timing differences are sort of normal because computers have lots of other things going on: timespacex '+:^:(1e5 1) 2' 0.005421 12160 timespacex '+:^:(1e5 1e4) 2' 0.003509 12160 timespacex '+:^:(1e5 1e4) 2' 0.004045 12160 FYI, -- Raul On Thu, Aug 10, 2017 at 3:28 PM, 'Pascal Jasmin'

Re: [Jprogramming] apply iteratively

2017-08-10 Thread 'Pascal Jasmin' via Programming
performance measurements imply that it doesn't duplicate it, a =. |. 4 }. i.63 20 timespacex 'a { +: ^: (<63 ) 2' 2.168e_5 40832 20 timespacex ' +: ^: (a ) 2' 1.944e_5 38144 20 timespacex ' +: ^: (63 ) 2' 5.648e_6 1536 these results don't differ by much, but surprised that they do differ.

Re: [Jprogramming] apply iteratively

2017-08-10 Thread Rudolf Sykora
> yes its efficient, simply collecting the results of each iteration > while the function is applied to the "last value". Do you mean that F^:(5 3) y does not do any calculation for the '3' ? Does that mean that the evaluation can't be parallelized, and that it proceeds in order? Or is it even cle

[Jprogramming] Multidimensional Root Finding with Newton Solver

2017-08-10 Thread Martin
Hi there, J looks very interesting. I have no previous experience with array languages and, being curious, started to experiment. Now, I would like to solve a system of non-linear equations. I could only examples solving single equations like this one: N=: 1 : '- u % u d. 1' NB. Adverb imple

Re: [Jprogramming] J for iOS

2017-08-10 Thread 'Mike Day' via Programming
Thanks, Joey. Will think about whether I wish to lose the odd script before proceeding. Mike Please reply to mike_liz@tiscali.co.uk. Sent from my iPad > On 10 Aug 2017, at 16:31, Joey K Tuttle wrote: > > The on device update path for iOS is via the "App Store" on the menu bar > ther

Re: [Jprogramming] J for iOS

2017-08-10 Thread Joey K Tuttle
The on device update path for iOS is via the "App Store" on the menu bar there, the rightmost item is Updates. That will show you pending updates for all your Apps. Items appearing there have a button "UPDATE" and after invoking that and downloading/installing the update, that will change to "OP

Re: [Jprogramming] apply iteratively

2017-08-10 Thread robert therriault
Hi Ruda, Take a look at the effect of boxed arguments on the Power page of the dictionary. http://www.jsoftware.com/help/dictionary/d202n.htm Your example would become F^:( On Aug 10, 2017, at 7:30 AM, Rudolf Sykora wrote: > > Hello, > > if I want to apply a function F iteratively say 0, 1,

Re: [Jprogramming] apply iteratively

2017-08-10 Thread 'Pascal Jasmin' via Programming
yes its efficient, simply collecting the results of each iteration while the function is applied to the "last value". From: Rudolf Sykora To: programm...@jsoftware.com Sent: Thursday, August 10, 2017 10:30 AM Subject: [Jprogramming] apply iteratively Hello

[Jprogramming] apply iteratively

2017-08-10 Thread Rudolf Sykora
Hello, if I want to apply a function F iteratively say 0, 1, 2, 3 .. N times on y (and see the individual results), I know I can do F^: (i.N) y But is this efficient or not? I.e., does the F^:3 uses the result of previously calculated F^:2 ? Or are the calculations completely independent (as I g

Re: [Jprogramming] J for iOS

2017-08-10 Thread 'Mike Day' via Programming
I'm still an ingenu on iPad; how do I get it to update? Searching APPS for jsoftware reveals J701, with a rectangular open button. No evident option to update. Selecting OPEN starts up my existing version... Thanks, Mike On 10/08/2017 00:55, Eric Iverson wrote: Joey, Patrick, It looks as