Skip to content

CitrusPunk/approximate-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Approximate-Pi

This project implements a approximation of Pi in several different programming languages.
This is done with the Monte Carlo Method which roughly places random points on a plane and checks if they are inside or outside of that circle.
Random points on circle
Source: Wikipedia

The implementations are located in flavors/[LANGUAGE_NAME]. The source code of each language contains the requirements and instructions on how to execute the implementation.

An unofficial goal of this project is to have all the letters of the alphabet represented in the initial letters of the programming language (24/26). All languages make a total of 40 right now - may we reach 50 some day.

Disclaimer

Those implementations are neither comparable nor should they show benchmarks of any programming language the algorithm was implemented with. I try to keep the implementation as simple as possible. The files might not satisfy best practices of the used programming language - improvements suggestions are welcome though. Moreover, it is debatable whether each language used can be called a programming language on its own.

To Do

Languages that are "work in progress" can be found on the dev branch.

  • Parallelize Mojo implementation to optiomize functionality and highlight differences to python
  • Orc
  • Emojicode
  • Etoys

Done

A Ada N Nim Nial
B Ballerina O Octave
C C++ C# Crystal P PHP Perl Python
D D Dart Q
E Euphoria R R Ruby Rust
F Fortran F# S Scala Scratch
G Go T TypeScript
H Haxe U Unison
I Icon Io V Visual Basic VVVV
J Java JavaScript Julia W Wax
K Kotlin X
L LOLCODE Lua Lisp Y YorLang
M MySQL Z Zig

About

Approximate Pi in different programming languages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published