{ "info": { "author": "Sameer Marathe", "author_email": "transmogrifier@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "PiDigits\n********\n\n*PiDigits* Implements the 'Unbounded Spigot Algorithm for the Digits of Pi' by\nJeremy Gibbons. The paper describing this algorithm can be found at this\n`URL`_. The same algorithm is used to generate digits of `Tau`_. No matter which\ncircle constant you prefer, you can now generate the decimal expansion using\nthis package.\n\nInstallation\n------------\n*pidigits* is avalaible through Python Package Index (`PyPI`_) using `pip`_. ::\n\n >>> pip install --upgrade pidigits\n\nTo uninstall using `pip`_. ::\n\n >>> pip uninstall pidigits\n\nUsage\n-----\nPiDigits provides a generator function named *piGenerator* that yields the\ndigits of Pi as needed. The streaming algorithm based on Lambert's expression\nis used for the generator function. ::\n\n >>> from pidigits import piGenerator\n >>> mypi = piGenerator()\n >>> first20pi = [next(mypi) for i in range(20)]\n >>> first20pi\n [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4]\n\n**Example**: Verify the `Feynman point`_. ::\n\n >>> mypi = piGenerator()\n >>> first1001 = [next(mypi) for i in range(1001)]\n >>> feynman = first1001[762:768]\n >>> print feynman\n [9, 9, 9, 9, 9, 9]\n\nAlternatively you can also use the *getPi(n)* function to get the first *n*\ndigits of Pi. ::\n\n >>> from pidigits import getPi\n >>> first20pi = getPi(20)\n >>> first20pi\n [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4]\n\nAlternate implementations of streaming algorithms based on Leibniz series and\nGosper's series are also available as generator functions *piGenLeibniz* and\n*piGenGosper* and corresponding *getPiLeibniz* and *getPiGosper* functions.\nThese implementations are slower than the one based on Lambert's series.\n\nPidigits also provides a generator function name *tauGenerator* that yields the\ndigits of `Tau`_ as needed. ::\n\n >>> from pidigits import tauGenerator\n >>> mytau = tauGenerator()\n >>> first20tau = [next(mytau) for i in range(20)]\n >>> first20tau\n [6, 2, 8, 3, 1, 8, 5, 3, 0, 7, 1, 7, 9, 5, 8, 6, 4, 7, 6, 9]\n\nAlternatively you can also use the *getTau(n)* function to get the first *n*\ndigits of Tau.\n\nDevelopment\n-----------\nIf you clone the repository (`GitHub`_, `BitBucket`_) and make any changes to\nthe algorithm you can run the test cases in the _tests package included with\nthe source to test your changes.\n\nTo run the tests, in the same directory as *setup.py*, first run: ::\n\n >>> python setup.py develop\n\nThis will install the package in the 'development' mode. Then run the\ntest cases: ::\n\n >>> python setup.py test\n\n`Bug reports`_ or suggestions are most welcome.\n\nLicense\n-------\npidigits is licensed under `Apache License 2.0`_.\n\n.. _URL: http://www.cs.ox.ac.uk/jeremy.gibbons/publications/spigot.pdf\n.. _PyPI: https://pypi.python.org/pypi\n.. _pip: https://pip.pypa.io\n.. _Apache License 2.0: https://www.apache.org/licenses/LICENSE-2.0.html\n.. _Feynman point: http://en.wikipedia.org/wiki/Feynman_point\n.. _GitHub: https://github.com/transmogrifier/pidigits\n.. _BitBucket: https://bitbucket.org/transmogrifier/pidigits\n.. _Bug reports: https://github.com/transmogrifier/pidigits/issues\n.. _Tau: https://tauday.com/tau-manifesto", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/transmogrifier/pidigits", "keywords": "mathematics number_theory pi spigot_algorithm", "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "pidigits", "package_url": "https://pypi.org/project/pidigits/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pidigits/", "project_urls": { "Homepage": "https://github.com/transmogrifier/pidigits" }, "release_url": "https://pypi.org/project/pidigits/0.5/", "requires_dist": null, "requires_python": null, "summary": "Generate arbitrary number of digits of Pi or Tau using a streaming algorithm.", "version": "0.5" }, "last_serial": 1613772, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4935558a110d78bf08a07c77da2d4055", "sha256": "ec9f501b8a320507014a14a5ca1abb4d5338828228fff10d98c16a488e1ee5fb" }, "downloads": -1, "filename": "pidigits-0.1.zip", "has_sig": false, "md5_digest": "4935558a110d78bf08a07c77da2d4055", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11208, "upload_time": "2015-03-27T22:40:31", "url": "https://files.pythonhosted.org/packages/b1/e8/3836619b1f19207c7aa297cbcc6a78036b84ff591956bdac476e22de8be7/pidigits-0.1.zip" }, { "comment_text": "", "digests": { "md5": "1447a09de9cb7a9819dd56f26a26f22e", "sha256": "1b4d585129baf6320cd72f0efd6ca1babcfceb00762f41ad6f5cc79f63cd1d22" }, "downloads": -1, "filename": "pidigits-0.3.zip", "has_sig": false, "md5_digest": "1447a09de9cb7a9819dd56f26a26f22e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11806, "upload_time": "2015-04-09T03:47:14", "url": "https://files.pythonhosted.org/packages/8c/30/fbc2e06f3db5024d94171d31bddea3d6450f14b19e1feb9d56799c68e9ab/pidigits-0.3.zip" } ], "0.3": [], "0.4": [ { "comment_text": "", "digests": { "md5": "98956f9dd683caaea3fb15ff9cb1e2c9", "sha256": "3bf8d284af90f8416ca6b3c259596c547318a98ea114fe37afb3a201f1983700" }, "downloads": -1, "filename": "pidigits-0.4.zip", "has_sig": false, "md5_digest": "98956f9dd683caaea3fb15ff9cb1e2c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15063, "upload_time": "2015-04-23T17:09:43", "url": "https://files.pythonhosted.org/packages/ed/e8/7f4df99ed2f6d075fdd7bfa5986ae3641c2dd8891bf497cd0edb9e1c6c89/pidigits-0.4.zip" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "c6eae454119c93a8edc5b94b97190abb", "sha256": "16c74d29f0d715550195ef262eb0f58ad1e0ab7f3b909cff6d2a162c412e5c9b" }, "downloads": -1, "filename": "pidigits-0.5.zip", "has_sig": false, "md5_digest": "c6eae454119c93a8edc5b94b97190abb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18050, "upload_time": "2015-06-30T19:34:38", "url": "https://files.pythonhosted.org/packages/c5/ab/1de553dcfd8e5912ac908ab2c0846a5a5ef70a704f8caefb4dcd148016c9/pidigits-0.5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c6eae454119c93a8edc5b94b97190abb", "sha256": "16c74d29f0d715550195ef262eb0f58ad1e0ab7f3b909cff6d2a162c412e5c9b" }, "downloads": -1, "filename": "pidigits-0.5.zip", "has_sig": false, "md5_digest": "c6eae454119c93a8edc5b94b97190abb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18050, "upload_time": "2015-06-30T19:34:38", "url": "https://files.pythonhosted.org/packages/c5/ab/1de553dcfd8e5912ac908ab2c0846a5a5ef70a704f8caefb4dcd148016c9/pidigits-0.5.zip" } ] }