-
系统:Linux or Windows
-
编译器:g++ for Linux or Visual Studio 2022 for Win
-
cmake
>>git clone https://github.com/jnulzl/Practical-implementation-of-Arbitrary-Precision-Algorithms
>>cd Practical-implementation-of-Arbitrary-Precision-Algorithms
>>cmake -B build_all -DCMAKE_BUILD_TYPE=Release
>>cmake --build build_all --config Release
# For Linux
>>./build_all/BorweinNonic
Usage:
./build_all/BorweinNonic digits_of_pi
>>./build_all/BorweinNonic 50
pi = 3.14159265358979323846242518065653893272160552913878E0
# For Win
> build_all\Release\BorweinNonic.exe
Usage:
build_all\Release\BorweinNonic.exe digits_of_pi
> build_all\Release\BorweinNonic.exe 50
pi = 3.14159265358979323846242518065653893272160552913878E0
强烈建议阅读一下[Practical implementation of PI Algorithms](doc/HVE Practical implementation of PI Algorithms.pdf),里面包含许多经典算法的源码!
以下参考链接均来自同一个人**Henrik Vestermark**