I expect Raul's asleep...

He's taking the dot product of the required number of primes

p:@i.@#

raised to those powers.

ie if we call the primes p and the powers q,  he wants
*/ p ^ q

One J-way to do this is p (*/ . ^) q, which is what Raul did,
but you can also do
p (*/ @: ^) q    or   p ([: */  ^) q

The caret acts as power, as you'd expect.
The dot just happened to be adjacent to it,
but there's no J primitive of the form ./ so it
parses ok.

Somewhat surprisingly (!?) you can even do
_&q:^:_1] q

so
    _&q:^:_1 ] 46 20 9 6 2 3 1 1 1 1 1 0 1 0 1 0 1 0 0 1x  NB. !??!

808017424794512875886459904961710757005754368000000000


Mike


On 30/08/2014 12:48, Jon Hough wrote:


I tried understanding your code.
Why do you do .^ instead of ^?
Perhaps I'm missing something.

From: [email protected]
Date: Sat, 30 Aug 2014 03:18:42 -0400
To: [email protected]
Subject: [Jchat] Monster group

    (p:@i.@# */ .^ ]) 46 20 9 6 2 3 1 1 1 1 1 0 1 0 1 0 1 0 0 1x
808017424794512875886459904961710757005754368000000000

(That's the order of the largest sporadic group. Which basically means
groups which we haven't managed to fit into an of the infinite
families of "simple" finite groups.)

(I'm unwinding, not trying to convey anything specific.)

Thanks,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
                                        
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4745 / Virus Database: 4015/8125 - Release Date: 08/29/14





-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4745 / Virus Database: 4015/8125 - Release Date: 08/29/14

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to