bwittenbrook3 / chudnovsky-elixir

Generate the first n digits of pie in elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chudnovsky-elixir

A simple command line application to produce the first N digits of pie based on a user specified value. Utilizes a combination of the Chudnovsky Formula and Newton-Raphson convergence. Leverages the decimal elixir library for arbitrary precision decimal arithmetic in elixir.

mix deps.install
mix escript.build

./pi

How many digits of pi do you want to see? 400
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094

About

Generate the first n digits of pie in elixir


Languages

Language:Elixir 100.0%