In practice log* (at least for base 2) can have only a very few values, so
something involving I. should work quite well.


On Mon, Jul 7, 2014 at 7:19 AM, Dan Bron <[email protected]> wrote:

> Iterated log, usually written as log*(n), is defined piecewise as:
>
>                  +---------------------
>                 / 0             if n<:1
>         log*(n)=
>                 \ 1+log*(log n) if n> 1
>                  +---------------------
>
> This can be expressed directly in J using agenda (@.):
>
>         logstar =: 0:`(1+$:@^.)@.(1<:])"0
>
> But this feels fairly "procedural". All the work is in the recursion. Is
> there a more elegant way to express it?
>
> -Dan
> ----------------------------------------------------------------------
> 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