Thank you for the notes - I'll keep it in my bookmark as reference!

I started out this morning with my pre-calculus book trying to practice J
sentences with.  I wanted the numeric answers for complex roots.  Like:

// matlab version
syms x
eqn = x^6+1 == 0
solve(eqn, x)

But, it seems J only gives the principal root (?), not all 6 of them; so,
another opportunity for practise.  But, I ended up writing like ...
"matlab":

   ^ 0j1 * (1p1 + 2p1 * i.6) % 6  NB. 1st version

That was why I was browsing NuVoc, looking for examples/ideas, hoping to
see something to make my J sentence looks more ... "J-idiomatic" (while
learning something out of the process).

This is all I can I come up with today:

   ^ 0j1 * 6 %~ 1p1 + 2p1 * i.6   NB. 2nd version

How would the same answer look like in the eyes of J Masters?


thanks for your thoughts.

On Sat, Oct 23, 2021 at 4:18 PM 'Pascal Jasmin' via Programming <
[email protected]> wrote:

> a more hollistic explanation,
>
> Most conjunctions, and including the & and @ famillies, produce verb
> phrases when bound.  A verb or verb phrase can/has to produce different
> results/computations depending on monadic or dyadic cases.  In u@v, u is
> always monadic, and v is ambivalent.  in u&v, v is always monadic, and u is
> the valence of the verb phrase.
>
> A missing "composing conjunction" in J is ([ u v)  where u is always
> dyadic and v is ambivalent.  But the fact that it is easy to write as a
> fork suggests a dedicated conjunction is not needed.
>
>
> On Saturday, October 23, 2021, 03:30:09 p.m. EDT, Raul Miller <
> [email protected]> wrote:
>
>
>
>
>
> https://www.jsoftware.com/help/dictionary/d631.htm
>
>   x u&.v y ↔ vi (v x) u (v y)
>
> Here:
>   u is +
>   v is *:
>   vi is %: (or *:inv)
>   x is 3
>   y is 4
>
> So these are equivalent
>   3 +&.*: 4
>   %: (*:3) + (*: 4)
>   *:inv (*:3) + (*: 4)
>
> I hope this makes sense.
>
> --
> Raul
>
> On Sat, Oct 23, 2021 at 3:03 PM More Rice <[email protected]> wrote:
> >
> > Hello,
> >
> > (Sorry for the previous empty email - web page problem)
> >
> > please excuse another newbie question ...
> >
> > Ref: https://code.jsoftware.com/wiki/Vocabulary/starco
> >
> >    pythag =:  +&.*:
> >    3 pythag 4
> > 5
> >
> > + operated dyadically and acted on both x and y - ok.
> >
> > but how does *: know to act on x as well?  Isn't pythag using the monadic
> > definition of *: to square y only?
> >
> > so magical ...
> >
> > thank you for the pointer and have a great weekend.
> >
> >
> > Maurice
> > ----------------------------------------------------------------------
> > 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

Reply via email to