Meissel–Mertens constant: Difference between revisions

added Arturo
(added Arturo)
Line 132:
after 1270607 primes, the approximation is: 0.261497214255, last prime considered: 19999999
</pre>
 
=={{header|Arturo}}==
<syntaxhighlight lang="arturo">meisselMertens: function [depth][
Euler: 0.57721566490153286
m: (1//2) + ln 1-1//2
loop range.step:2 3 depth 'x ->
if prime? x ->
m: m + (1//x) + ln 1-1//x
 
return m + Euler
]
 
print meisselMertens 10000000</syntaxhighlight>
 
{{out}}
 
<pre>0.2614972157776471</pre>
 
=={{header|BASIC}}==
1,532

edits