Skip to content

Instantly share code, notes, and snippets.

View bram-inniger's full-sized avatar

Bram Inniger bram-inniger

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bram-inniger on github.
  • I am inniger ( on keybase.
  • I have a public key whose fingerprint is C816 9D45 B6FE C63B 4819 0744 4456 3233 F69C 7B3A

To claim this, I am signing this object:

bram-inniger / MonteCarlo.kt
Created March 22, 2023 12:12
Monte Carlo estimation of Pi
import kotlin.math.PI
import kotlin.math.abs
import kotlin.math.sqrt
import kotlin.random.Random
import kotlin.time.ExperimentalTime
import kotlin.time.measureTimedValue
object MonteCarlo {
fun estimatePi(nrPicks: Int = 1_000_000_000) =