Please log in (or register) to post a dweet (copy-paste the code somewhere safe to save it meanwhile)

u(t) is called 60 times per second.
t: Elapsed time in seconds.
S: Shorthand for Math.sin.
C: Shorthand for Math.cos.
T: Shorthand for Math.tan.
R: Function that generates rgba-strings, usage ex.: R(255, 255, 255, 0.5)
c: A 1920x1080 canvas.
x: A 2D context for that canvas.

Please log in (or register) to post as a new dweet (copy-paste code somewhere safe to save it meanwhile).

report

If you take two random integers of at most 7 digits each, what is the probability that they are relatively prime? This simulation suggests somewhere around 60%

In the graph, the x-axis shows number of trials, modulo 1920 (i.e. with wraparound). The y-axis shows % of trials with GCD 1, with 0% at bottom and 100% at top.

u(t) is called 60 times per second.
t: elapsed time in seconds.
c: A 1920x1080 canvas.
x: A 2D context for that canvas.
S: Math.sin
C: Math.cos
T: Math.tan
R: Generates rgba-strings, ex.: R(255, 255, 255, 0.5)

Please log in (or register) to comment.