So interesting that I downloaded Python,  but I couldn't understand
its timer class in the time I allowed myself.  It certainly _seems_
to take longer than the J solution, _except_ for the first call below,
which was my first return to a live J session after restarting my
laptop from standby:
  6!:2 'm | 1 + 28433 * 2 m&|@^ 7830457 [ m=: 10^10x'  NB. wake up!!!
0.117086
  6!:2 'm | 1 + 28433 * 2 m&|@^ 7830457 [ m=: 10^10x'  NB. woken up!!!
0.0003344

Mike


Roger Hui wrote:

On a 500 Mhz Pentium III:

  6!:2 'm | 1 + 28433 * 2 m&|@^ 7830457 [ m=: 10^10x'
0.000767137



----- Original Message ----- From: "bill lam" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, March 05, 2006 10:37 PM
Subject: Re: [Jprogramming] If Maple can, why can't J?

There is another time record in mathschallenge forum,

Python version
Only 1 line

About .5 sec


prime = (28433 * (2 ** 7830457) + 1) % (10**10)

print prime

J may be consider special code for pattern (+ve int)^(+ve int).


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


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

Reply via email to