RosettaCodeData/Task/Mertens-function/APL/mertens-function.apl

11 lines
334 B
APL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mertens{
step {,-/1,[n÷1n1+]}
m1000 step999,1
zero m1000+.=0
cross +/(~1)m10000
'First 99 Mertens numbers:'
10 10'∘',m1000
'M(N) is zero ',(zero),' times.'
'M(N) crosses zero ',(cross),' times.'
}