ChanServ changed the topic of #racket to: The Racket Programming Language -- https://racket-lang.org/ -- https://racket.discourse.group/ -- http://pasterack.org -- logged at https://libera.irclog.whitequark.org/racket/ -- This is the right place to ask for help with DrRacket. Remember to wait around for an answer!
skapata has quit [Remote host closed the connection]
notzmv has joined #racket
skapata has joined #racket
Origin has quit [Ping timeout: 268 seconds]
_whitelogger has joined #racket
notzmv has quit [Remote host closed the connection]
macabro has joined #racket
notzmv has joined #racket
skapata has quit [Quit: Bonan tageron kaj ĝis la.]
notzmv has quit [Read error: Connection reset by peer]
lxsameer has joined #racket
fun-safe-math_ has quit [Ping timeout: 276 seconds]
fun-safe-math has joined #racket
svm has joined #racket
svm has quit [Remote host closed the connection]
svm has joined #racket
msv has quit [Ping timeout: 268 seconds]
svm is now known as msv
spynxic has quit [Ping timeout: 276 seconds]
lxsameer has quit [Ping timeout: 252 seconds]
Everything has joined #racket
Everything has quit [Quit: leaving]
Origin has joined #racket
skapata has joined #racket
Origin has quit [Ping timeout: 248 seconds]
skapata has quit [Remote host closed the connection]
skapata has joined #racket
macabro has quit [Ping timeout: 248 seconds]
notzmv has joined #racket
notzmv has quit [Read error: Connection reset by peer]
svm has joined #racket
cow_2001 has quit [Quit: ⛧]
msv has quit [Ping timeout: 260 seconds]
cow_2001 has joined #racket
notzmv has joined #racket
lxsameer has joined #racket
notzmv has quit [Ping timeout: 276 seconds]
notzmv has joined #racket
notzmv has quit [Ping timeout: 248 seconds]
Tuplanolla has joined #racket
lxsameer has quit [Ping timeout: 248 seconds]
notzmv has joined #racket
uchtamazatov has joined #racket
uchtamazatov has left #racket [#racket]
uchtamazatov has joined #racket
notzmv has quit [Remote host closed the connection]
<uchtamazatov> hello, racket community
<uchtamazatov> can anyone confirm whether this function is a correct prime sieve?
<uchtamazatov> fun coprime(x): recursive_product(x) / linear_sum(x)
<uchtamazatov> fun prime(x): math.gcd(coprime(x), x) == 1
<uchtamazatov> for Set (x in 1 .. 1000): keep_when prime(x); x
<uchtamazatov> fun linear_sum(x):
<uchtamazatov> let r = x div 2 + x mod 2
<uchtamazatov> x * r + math.abs(1 - x mod 2) * r
<uchtamazatov> fun recursive_product(x):
<uchtamazatov> recur loop(i = x, n = 1):
<uchtamazatov> if i == 1 | n | loop(i - 1, i * n)
svm is now known as msv
Tuplanolla has quit [Quit: Leaving.]