This code is part of a project exploring Collatz for non-integers.
This code relies on the GNU Multiple Precision Arithmetic Library for calculation and GNU Plot for making graphs. Packages for libgmp and gnuplot should exist for most Linux distributions and are available via macports on macOS.
In Debian Linux:
$ sudo apt-get install libgmp10-dev gnuplot
In macOS using macports:
$ sudo port install gmp gnuplot
$ git clone https://github.com/fra99le/NonintegerCollatz.git
$ cd NonintegerCollatz
$ c++ -I/opt/local/include -L/opt/local/lib collatz_w.cpp -lgmp -lgmpxx -o collatz_w
$ ./collatz_w 33
$ ./plot_w.gplot