I think you mean something like
-:@(+2&%)^:(<_) 1
1 1.5 1.41667 1.41422 1.41421 1.41421
which is Newton's iteration for the square root of 2, adapted from
Example 3 of the Vocabulary page for Power u&:n . Example 3 uses a:
(boxed empty) in place of (<_) . f is the verb -:@(+2&%)
%: 2
1.41421
On 11/20/2011 4:36 AM, David Vaughan wrote:
> If I'm doing f^:(<x) y, can I write an expression so that f is repeatedly
> applied to y until the result has come up before?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm