Linux Instructions


To compile and use the source code provided on this site, you’ll need access to a Linux environment. Here are two affordable options:

  • Raspberry Pi 4 (2-4GB): Available for around $60 on Amazon.
  • Digital Ocean: Offers a 512MB Basic Ubuntu image for $4 per month (about $0.15 a day if you just want to play around and then delete the image)

Once you have access to the image, you will want to shell in via SSH (instructions can be found online or ask Chat GPT) and do the following:

cd ~/
mkdir PI
cd PI
sudo apt-get update
sudo apt-get install gcc
sudo apt-get install libgmp-dev
sudo apt-get install libmpfr-dev
sudo apt-get install vim
vim picalc.c

The above commands will create a PI directory in your home directory, install a C compiler, a text editor, and the necessary math libraries for the programs on this site.

Summary:

  • GCC: For compiling C code.
  • GMP: For handling arbitrary precision arithmetic.
  • MPFR: For reliable high-precision floating-point calculations.
  • VIM: Installs the vim text editor for pasting code into a source code file

Note that NANO can be used instead of VIM. Instructions for copying and pasting text from your clipboard to VIM or NANO can be found online or by asking Chat GPT.