to compute N digits of pi
Project description
this is toy tool to compute the N digits of pi
usage
python usage
- python3 setup build\
- python3 pi.py 1000 ### cpp usage
make pi_threadfor two threadsmake pi_v2for single thread
implementations
- pi.d:this is the original d language implementations of pi
- pi.cpp: motivated by pi.d and use two threads to build the dynamic shared library
test/pi_v2.cppis single threadtest/pi_thread.cppis two threads
reference:
-
v1: $$\arctan(\frac{1}{2}) +\arctan(\frac{1}{3}) =\frac{\pi}{4}$$
-
v2: $$4\arctan(\frac{1}{5}) - \arctan(\frac{1}{239}) =\frac{\pi}{4}$$
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pi_compute-3.14.1.tar.gz
(11.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pi_compute-3.14.1.tar.gz.
File metadata
- Download URL: pi_compute-3.14.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.6.4 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca33557a78eb28fb2d8ce818e9406b79b32b1d6e702260dd26f70db52a263306
|
|
| MD5 |
ed6ac509c622e2824e3085aabf61e80a
|
|
| BLAKE2b-256 |
62344e9626e2cfe172adcf74e3df8f28774bfa92a76e21b10538604157b2d83f
|
File details
Details for the file pi_compute-3.14.1-py3-none-any.whl.
File metadata
- Download URL: pi_compute-3.14.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.6.4 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b83252b1894c361083e225ea80b1e3da98b69e5f1e4a66df92c6308e62221507
|
|
| MD5 |
75c930d15cad9f3a2508b113e70f07b7
|
|
| BLAKE2b-256 |
937bed4e518e5a51f6888730735e981f8f0b932096900ba7f87706cc8dca639e
|