You can also use p: to find the totient of a number.

   (- ~:) &. q: 12
4
   5 p:12
4

If you want to see the flow of the hook, put the cursor on your expression
and press F2.

It is interesting to note the the inverse of q: is */ .

On Sun, Apr 2, 2017 at 1:48 AM, Raul Miller <rauldmil...@gmail.com> wrote:

> Are you asking about trains (hooks and forks)?
>
> http://www.jsoftware.com/help/dictionary/dictf.htm
>
> Thanks,
>
> --
> Raul
>
>
> On Sun, Apr 2, 2017 at 3:39 AM, Martin Kreuzer <i...@airkreuzer.com>
> wrote:
> > Hi all -
> >
> > In section 'Primes' of the Vocabul I found this line of code (at the very
> > end, function no 5):
> >
> > (- ~:) &. q: y
> >
> > I do know that it is another way to calculate the totient of y, and
> > I'm somehow familiar with the use of (~:) and (&.) and (q:), but
> > have not yet found any documentation of this construct (- ~:)
> > [btw, these seem to work too (+ ~:), (* ~:), (% ~:)]
> >
> > Where should I explore further..?
> >
> > -M
> >
> > ----------------------------------------------------------------------
> > 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