Skip to main content

to compute N digits of pi

Project description

this is toy tool to compute the N digits of pi

usage

install

  • python3 -m pip install pi-compute or
  • python3 -m pip install --index-url https://pypi.org/simple/ pi-compute

python usage

  • python3 -m pi_compute.pi 1000
  • import pi_compute as pi; pi.compute(1000)

cpp usage

  • make pi_thread for two threads
  • make pi_v2 for 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.cpp is single thread
  • test/pi_thread.cpp is two threads

reference:

Project details


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.1592.tar.gz (14.0 kB view details)

Uploaded Source

File details

Details for the file pi_compute-3.14.1592.tar.gz.

File metadata

  • Download URL: pi_compute-3.14.1592.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for pi_compute-3.14.1592.tar.gz
Algorithm Hash digest
SHA256 26466d4c5284378f48be9a1cb6d2a3bb902a4c8bbbe24a07f785f1fd0db39653
MD5 637586c330466281828eb968aa3bacaf
BLAKE2b-256 af7ffba96fa06d653adbca47a750b609493d74b48bd6cb701e8e1b164551aec5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page