A quirkiness of J is that ": is faster than 10&#. inv.  Especially with larger 
extended numbers.




----- Original Message -----
From: Kip Murray <[email protected]>
To: "[email protected]" <[email protected]>
Cc: 
Sent: Thursday, October 15, 2015 5:03 PM
Subject: [Jprogramming] Finding prime palindromes

My solution is forwarded below.

Try

find i. 40

--Kip Murray

---------- Forwarded message ---------
From: km <[email protected]>
Date: Thu, Oct 15, 2015 at 3:51 PM
Subject: Finding prime palindromes
To: Kip Murray <[email protected]>


Here's my solution.  --Kip Murray

test =: ( [: (-: |.) 10&#.^:_1 )"0

find =: [: (test # ]) p:  NB. find prime palindromes


Sent from my iPad
----------------------------------------------------------------------
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