The J code on SO for odd numbers is missing the ">"
This is what is posted on SO:
c=:*:({&' *'@],&":2%(%+/@,))] (|@j./~2&|#])@i:@<:
c 13
|index error: c
This is what it should be:
c=:*:({&' *'@],&":2%(%+/@,))]>(|@j./~2&|#])@i:@<:
Skip
On Mon, Jul 22, 2013 at 9:13 PM, Marshall Lochbaum <[email protected]>wrote:
> I don't have an SO account, so go ahead and post that. While I'm at it,
> I shaved a character off the original by noting that the length of the
> circle is half the diameter for even lengths. This doesn't hold for odd
> lengths, so it won't help there.
>
> c=:({&' *',&":2*+/@,%*:@#)@:>_2{.\|@j./~@i:@<:
>
> Marshall
>
> On Mon, Jul 22, 2013 at 10:07:57PM -0400, Dan Bron wrote:
> > Oh! Nice. If you have an account on SO feel free to post it, I'll vote
> it
> > up past my original. If you don't, I'll replace mine with yours and link
> to
> > your message on the Forum.
> >
> > -Dan
>
--
Skip Cave
Cave Consulting LLC
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm