Butch Lakeshore wrote:
> Cut/past what was in your email
>
> powGB =: (* *:)/@(|.@|....@#:@] { 1x , [)
You still have two |.s in there. Did you cut/paste the first definition (the
quoted one) or the second (Bill's)? The two |.s
look like you took the copied the first, but the spacing looks like you copied
the second.
Maybe your system, for some reason, duplicates |.@ when it's in your copy
buffer? I can see no other reason for |.@ to be
duplicated (assuming you're not doing it by hand).
Try taking the definition above, and deleting the leftmost |.@ so that you
only have one instance of that train, and your
definition looks byte for byte like this:
powGB =: (* *:)/@(|....@#:@] { 1x , [)
If you put the above in quotes and enter the following sentences, you should
get identical results:
# ;: 'powGB =: (* *:)/@(|....@#:@] { 1x , [)'
19
'|.@' +/@E.&;: 'powGB =: (* *:)/@(|....@#:@] { 1x , [)'
1
And, yes, testing reveals this definition is correct:
2 powGB 11
2048
2 powGB 13
8192
2 (powGB"0 -: ^) i. 100x
1
I will be very surprised if it doesn't produce the same results on your system,
once you have the proper definition.
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm