Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Jose Mario Quintana
Right, I remember now you mentioned that visualization tool before. It turns out that Skip function actually was, f=. 8 + (2 ^ ]) - (2 ^ 2) ^ ] instead of, g=. 8 + (2 ^ ]) - 2 ^ 2 ^ ] which I was entertaining earlier last night. Coincidentally, today I was exploring some solutions for f...

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Louis de Forcrand
Indeed I should’ve mentioned it; I was referring to my earlier message: 0 = (4^z) - (2^z) - 8 = _8 _1 1 p. 2^z so 2^(x+iy) = z = (1 +- (%:33))/2. The rest should be clearer now. Thanks, Louis > On 29 Jan 2018, at 18:43, Raul Miller wrote: > > I do not know which of j expressions which could

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Raul Miller
I do not know which of j expressions which could have matched original expression you were referring to. Thanks, -- Raul On Mon, Jan 29, 2018 at 12:39 PM, Louis de Forcrand wrote: > Yes, typed a little fast. > > sqrt33 = %:33. > > Why does it not make sense? > > Louis > >> On 29 Jan 2018, at

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Louis de Forcrand
Yes, typed a little fast. sqrt33 = %:33. Why does it not make sense? Louis > On 29 Jan 2018, at 18:35, Raul Miller wrote: > > What is sqrt33 here? (I would have guessed %:33 but that does not make > sense to me.) > > Thanks, > > -- > Raul > > >> On Mon, Jan 29, 2018 at 12:31 PM, Louis de

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Louis de Forcrand
I would recommend using D. instead of d. in general for more complicated or explicit verbs. (lower case) d. assumes your verb is a scalar verb and tries to perform a symbolic differentiation on tacit verbs only, while D. differentiates numerically. Not all verbs can be differentiated with d., b

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Skip Cave
Louis mentions a different Newton Raphson verb: VN=: 1 : 0 - u %. u D.1 ) This one works on either form of the equation: v =: 3 : '8 + (2^y) - (2^2*y)' vv =: (8: + (2&^) - (2&^)@(2&*)) vv VN (^:20) 1 1.75372489415532 v VN (^:20) 1 1.75372489415532 Skip Skip Cave Cave Consultin

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Raul Miller
What is sqrt33 here? (I would have guessed %:33 but that does not make sense to me.) Thanks, -- Raul On Mon, Jan 29, 2018 at 12:31 PM, Louis de Forcrand wrote: > I skipped a few steps there. With pencil and paper, I find that (using > standard notation) > > 2^(x+iy) = (1 +- sqrt(33)) / 2 > >

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Raul Miller
A rule I was working with was that if the individual terms were differentiable, then their sums would be differentiable. This turns out to be slightly more rigorous than what's actually required: 8: d. 1 0"0 8 d. 1 |nonce error but (8 + ]) d. 1 1x"0 In other words, 8: is a verb that d

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Louis de Forcrand
I skipped a few steps there. With pencil and paper, I find that (using standard notation) 2^(x+iy) = (1 +- sqrt(33)) / 2 Yet 2^(x+iy) = 2^x * 2^iy, and because the whole is real, 2^iy must be real. Moreover, when y is such that 2^iy is real (when y is a multiple of Pi/log2) then 2^iy = exp(lo

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread 'Bo Jacoby' via Programming
What does 'best' method mean? Bisection is OK f=. 3 : '(-2^2^y) + (2^y) +8' f 1.818415 1.81842 1.61514e_5 _6.92891e_5 Den 16:04 mandag den 29. januar 2018 skrev Raul Miller : Oops, yes, sorry, careless of me. Thanks, -- Raul On Mon, Jan 29, 2018 at 4:12 AM, Rob Hodgkinson wrote

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Skip Cave
What are the rules required to re-format a verb to make it processable by N? The original equation: (2^x) - 2^2*x = _8 The reformatted equation: (8: + (2&^) - (2&^)@(2&*)) Why the colon? Why the @ sign? Why the ampersand? Why not make a monadic verb?: v =: 3 : '8 + (2^y) - (2^2*y)' vv =: (8

[Jprogramming] Another Quora Problem

2018-01-29 Thread Andrew Nikitin
Jose Mario Quintana wrote: > but, it is not the only one, > > (X=. (8 + (2 ^ ]) - (2 ^ 2) ^ ])New (^:22) 0.5j_0.5) > 1.24627511j4.53236014 There is way more than that. If you use "phase portrait visualization tool" (e.g. from here http://code.jsoftware.com/wiki/User:Andrew_Nikitin/Phase_port

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Raul Miller
Oops, yes, sorry, careless of me. Thanks, -- Raul On Mon, Jan 29, 2018 at 4:12 AM, Rob Hodgkinson wrote: > Minor correction Raul (- instead of +) ? > ... use (8: + (2&^) - (2&^)@(2&*)) > > So Skip, just to clarify to see this solution put through Newton-Raphson; > > 1) Create the Newton-Ra

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Rob Hodgkinson
Minor correction Raul (- instead of +) ? ... use (8: + (2&^) - (2&^)@(2&*)) So Skip, just to clarify to see this solution put through Newton-Raphson; 1) Create the Newton-Raphson adverb as you stated earlier; N=: 1 : '- u % u d. 1’ 2) Apply for a number of iterations using ^: and give i

Re: [Jprogramming] Another Quora Problem

2018-01-29 Thread Raul Miller
d. 1 wants to be able to use the chain rule for 2^2*x, and it seems like the implementation was from an early version of J, and has not kept up with all the more recent changes. So, you should put that changed term into an f@g form. In other words, use (8: + (2&^) + (2&^)@(2&*)) Thanks, -- Raul