GithubHelp home page GithubHelp logo

findingpi's Introduction

Finding Pi

This repo was created inspired by Matt Parker's weird and awesome passion for finding pi in interesting creative ways.

Ways of finding Pi

1. Co-prime Random Numbers

This first method is taken directly from one of Matt's videos. Basically the idea is to find pi experimentally through the probability that given two random numbers they'll be co-prime. This can be proven to be 6/(pi^2). You can see the proof given by Matt on his video.

2. Monte Carlo

Imagine you have a square with a side of length L, and imagine that you have a circle inscribed in that square (therefore of radis L/2). What is the chance that a randomly chosen point inside that square is also inside the circle? pi/4. To find pi we can experimentally approximate that probability and then multiply it by 4.

3. Buffon's Needle

If you throw many needles at a ruled paper, you can try and estimate PI by counting how many of those needles crossed a line. The needle's length must be no more than the length between the lines of the paper.

findingpi's People

Contributors

augustoqueiroz avatar pedroqueiroga avatar

Watchers

 avatar  avatar

Forkers

pedroqueiroga

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.