Legendre prime counting function: Difference between revisions

Content deleted Content added
Rdm (talk | contribs)
m J: bugfix -- powers of 10 are not prime
Rdm (talk | contribs)
m J: a note of explanation
Line 439:
10^8: 5761455
10^9: 50847534</lang>
 
A complete implementation of the legendre prime counting function would be <tt>(1&p: + p:inv)</tt>:
 
<lang J> (1&p: + p:inv) 10
4
(1&p: + p:inv) 11
5</lang>
 
But we can simplify that to p:inv when we know that primes are not being tested.
 
=={{header|jq}}==