I just noticed a typo in the formula repeated from the original paper.  One
of the left parens is misplaced:

(-b)(+,-)√((b*2)-4×a×c)÷2×a   ⍝ wrong
((-b)(+,-)√(b*2)-4×a×c)÷2×a




On Tue, Dec 11, 2012 at 10:59 AM, Roger Hui <[email protected]>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 <[email protected]> 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

Reply via email to