It is even possible to make t. disappear:
f=: 13 :'+.r.}.i.#^ t. i.y'
f 8
0.540302 0.841471
_0.416147 0.909297
_0.989992 0.14112
_0.653644 _0.756802
0.283662 _0.958924
0.96017 _0.279415
0.753902 0.656987
5!:4 <'f'
-- [:
+- +.
--+ -- [:
│ +- r.
L----+ -- [:
│ +- }.
L----+ -- [:
│ +- i.
L----+ -- [:
│ +- #
L----+ -- [:
│ │ -- %
L----+- @ -+- !
L- i.
f
[: +. [: r. [: }. [: i. [: # [: %@! i.
g=:[: +. [: r. [: }. [: i. [: # [: % [: ! i.
g 8
0.540302 0.841471
_0.416147 0.909297
_0.989992 0.14112
_0.653644 _0.756802
0.283662 _0.958924
0.96017 _0.279415
0.753902 0.656987
5!:4 <'g'
5!:4 <'g'
-- [:
+- +.
--+ -- [:
│ +- r.
L----+ -- [:
│ +- }.
L----+ -- [:
│ +- i.
L----+ -- [:
│ +- #
L----+ -- [:
│ +- %
L----+ -- [:
L----+- !
L- i.
Linda
Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Sunday, December 16, 2012 2:09 AM
To: [email protected]
Subject: Re: [Jprogramming] Cool roots
That can be simplified:
]d=: ^ t. i.6
1 1 0.5 0.166667 0.0416667 0.00833333
+. r.}.i.# d
0.540302 0.841471
_0.416147 0.909297
_0.989992 0.14112
_0.653644 _0.756802
0.283662 _0.958924
Linda
-----Original Message-----
From: <mailto:[email protected]>
[email protected]
[ <mailto:[email protected]>
mailto:[email protected]] On Behalf Of Aai
Sent: Friday, December 14, 2012 8:33 AM
To: <mailto:[email protected]> [email protected]
Subject: Re: [Jprogramming] Cool roots
> +. a=: (init=: <mailto:r.@%7d.@i.@#> r.@}.@i.@#) c |a
> +. ( <mailto:r.@%7d.@i.@#> r.@}.@i.@# (120 120 60 20 5 1 | a))
>
It probably should be
+. a=: (init=: <mailto:r.@%7d.@i.@#> r.@}.@i.@#) c |d
0.540302 0.841471
_0.416147 0.909297
_0.989992 0.14112
_0.653644 _0.756802
0.283662 _0.958924
the trailing 1s shown in the first row of the text are a little enigma.
--
Met vriendelijke groet,
@@i = Arie Groeneveld
----------------------------------------------------------------------
For information about J forums see <http://www.jsoftware.com/forums.htm>
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see <http://www.jsoftware.com/forums.htm>
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm