'a b c'=: 10`_1`_21 | (2*a) %~ (-b) (+,-) %: (b^2) - 4*a*c 1.5 1.4 This will cut a couple of months out of Algebra 2.
'a b c'=:4 4 2 (2*a) %~ (-b) (+,-) %: (b^2) - 4*a*c _0.5j0.5 _0.5j_0.5 That takes a big chunk of the spring of the sophomore or junior year in high school. The challenge these day is to get students to wonder and care about why it works, as opposed to wanting a "button" to take care of it flawlessly. Then all that is necessary for them is to vaguely understand when and how to use it. Linda -----Original Message----- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of km Sent: Tuesday, December 11, 2012 2:37 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Cool roots It appears this could be translated into J as the rather cool (2*a) %~ (-b) (+,-) %: (b^2) - 4*a*c Sent from my iPad On Dec 11, 2012, at 12:59 PM, Roger Hui <rogerhui.can...@gmail.com> wrote: > Example from the Iverson and McDonnell *Phrasal > Forms*<http://www.jsoftware.com/papers/fork.htm>paper (which > introduced fork): > > (-b)(+,-)√((b*2)-4×a×c)÷2×a > > √ is a postulated APL primitive, spelled %: in J. > > > > > On Tue, Dec 11, 2012 at 10:49 AM, km <k...@math.uh.edu> wrote: > >> What is the coolest way of programming the quadratic formula in J? >> We are finding the roots of polynomial c + x*(b + x*a) without using >> p. . I offer >> >> roots >> 3 : 0 >> 'a b c' =. y >> q =. %: (b^2) - 4*a*c >> (2*a) %~ (-b) + q,-q >> ) >> roots 1 3 2 >> _1 _2 >> roots 1 0 1 >> 0j1 0j_1 >> roots 1 _2 1 >> 1 1 >> >> partly as problem definition. I am looking for cool roots verbs! >> >> Kip Murray >> >> Sent from my iPad >> >> --------------------------------------------------------------------- >> - For information about J forums see >> http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm