NARS2000
1 program
Added 2026-02-11T12:54:17Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: NARS
Provenance: commit 3f5c371cb2 · authored 2026-02-11T13:55:16+01:00 · agent claude-code · model sonnet
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Sieve of Eratosthenes
Provenance: commit 3f5c371cb2 · authored 2026-02-11T13:55:16+01:00 · agent claude-code · model sonnet · WebSearch disabled
⍝ Sieve of Eratosthenes - finds all prime numbers up to N
∇ result ← Sieve N
⍝ Create a boolean vector where 1 means prime
result ← (N⍴1)
result[1] ← 0
⍝ Mark multiples of each number as composite
:For i :In 2..⌊N*0.5
:If result[i]
result[i×⍳⌊N÷i] ← 0
:EndIf
:EndFor
⍝ Return the indices where result is 1 (the primes)
result ← result/⍳N
∇