Jump to content

Talk:Legendre prime counting function: Difference between revisions

Line 60:
 
::: It's all making perfect sense now :) --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 09:51, 11 November 2022 (UTC)
 
A minor point but I've just noticed that the V entry (and hence the translations of it) don't deal with the trivial cases n = 3 to 8 inclusive. To solve it without messing with the algorithm I suggest inserting the following as the second line of the ''count_primes_to'' function:
<pre>
if n < u64(9) { return i64((n + 1) / 2) }
</pre> --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 20:50, 12 November 2022 (UTC)
9,488

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.