{ "info": { "author": "JM Allard", "author_email": "jma214@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "## arith_lib: A set of functions for miscellaneous arithmetic calculation\n\n### List of implemented functions\n\n* **gcd(\\*arg):**\nGreatest common divisor of a set of integers\n\n* **lcm(\\*arg):**\nLeast common multiple of a set of integers\n\n* **bezout(a, b):**\nProvides a particular solution to diophantine equation a.u+b.v=gcd(a, b)\n\n* **modulo_inv(a, b):**\nInverse of a modulo b\n\n* **chinese_remainder(r, m):**\nSolves the modular system:\n * x = r1 mod m1\n * x = r2 mod m2\n * ...\n * x = r_n mod m_n\n\n* **gene_pseudo_prime():**\nA generator which provides 2, 3, 5 and then all integers non multiple of 2, 3, 5\n\n* **is_prime(n):**\nCheck for n primality. Miller-Rabin primality test is used\n\n* **next_prime(n):**\nProvides the first prime greater or equal to n\n\n* **previous_prime(n)**\nProvides the first prime smaller or equal to n\n\n* **prime_factorization(n, frmt):**\nPrime factorization of n\n\n* **divisors(n):**\nProvides all divisors of n\n\n* **phi(n):**\nEuler totient function\n\n* **moebius(n):**\nMoebius function\n\n* **to_base(n, \\*kwarg):**\nConversion from base 10 to base B\n\n* **frobenius(\\*A, n=None):**\nSolves equation a1.x1 + a2.x2 + .. + ap.xp = n or finds\nthe greatest n for which this equation has no solution.\na1, a2, ... are positive integers.\nx1, x2, ... are the unknowns, positive integers\n\n* **isqrt(n)**\nProvides the integer part of the square root of n\nwhere n is an integer of any size\n\n* **is_miller_rabin_witness(a, n)**\nReturn True if 'a' is a Miller-Rabin witness for n\n\n* **get_random_prime(nbits, lessthan)**\nProvides a random prime with exactly or at most 'nbits' bits\n\n* **is_strong_pseudoprime(a, n)**\nReturn True is n is a strong pseudo prime to base 'a'\n\n\n### Installation\n\npip install arith_lib\n\n\n### Utilization\n\nfrom arith_lib import \\*\n\n\\>>> gcd(15, 20)\n5\n\n\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "gcd lcm bezout pseudo prime miller rabin factorization divisor chinese remainder phi euler totient moebius base frobenius isqrt", "license": "", "maintainer": "", "maintainer_email": "", "name": "arith-lib", "package_url": "https://pypi.org/project/arith-lib/", "platform": "", "project_url": "https://pypi.org/project/arith-lib/", "project_urls": null, "release_url": "https://pypi.org/project/arith-lib/2.0.0/", "requires_dist": null, "requires_python": "", "summary": "A set of functions for miscellaneous arithmetic calculation", "version": "2.0.0" }, "last_serial": 4879134, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9b3c4a41ef86450ff741995feb9cffde", "sha256": "95f23d8faf76900a695d94ff064e0446bda846795de3fe2bbd7e2fa80a141712" }, "downloads": -1, "filename": "arith_lib-0.0.1.zip", "has_sig": false, "md5_digest": "9b3c4a41ef86450ff741995feb9cffde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14593, "upload_time": "2016-09-09T13:00:53", "url": "https://files.pythonhosted.org/packages/ec/96/ac7fdf565957aeb693b1feeb5fbe3d42c9e8b7e99b6bcbd6117b29d7b191/arith_lib-0.0.1.zip" } ], "1.0.0": [], "2.0.0": [ { "comment_text": "", "digests": { "md5": "24dd0eae078167798256134db326e98c", "sha256": "ea6c3f6722ca0bfc163c9df5c65eb7a7a70d0b98ef9fcf413b367e9a38f341a7" }, "downloads": -1, "filename": "arith_lib-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "24dd0eae078167798256134db326e98c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16194, "upload_time": "2019-02-28T13:05:45", "url": "https://files.pythonhosted.org/packages/38/0a/a70baa27fac1b428229eca1ecb18e9358e7a9dac65bb24e7a18b109046a4/arith_lib-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ab092db05ae2be9d53f1fbabe630100", "sha256": "304b05d376b69e86e49f1527f3cdc4674c5d8182cbf86f331586ca71b1d5ea47" }, "downloads": -1, "filename": "arith_lib-2.0.0.tar.gz", "has_sig": false, "md5_digest": "6ab092db05ae2be9d53f1fbabe630100", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14786, "upload_time": "2019-02-28T13:05:46", "url": "https://files.pythonhosted.org/packages/ed/65/b0db31b1fcfd1e22a93708c52d68144e2b12aaf1713ca2ed5b81c5d73ca3/arith_lib-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "24dd0eae078167798256134db326e98c", "sha256": "ea6c3f6722ca0bfc163c9df5c65eb7a7a70d0b98ef9fcf413b367e9a38f341a7" }, "downloads": -1, "filename": "arith_lib-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "24dd0eae078167798256134db326e98c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16194, "upload_time": "2019-02-28T13:05:45", "url": "https://files.pythonhosted.org/packages/38/0a/a70baa27fac1b428229eca1ecb18e9358e7a9dac65bb24e7a18b109046a4/arith_lib-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6ab092db05ae2be9d53f1fbabe630100", "sha256": "304b05d376b69e86e49f1527f3cdc4674c5d8182cbf86f331586ca71b1d5ea47" }, "downloads": -1, "filename": "arith_lib-2.0.0.tar.gz", "has_sig": false, "md5_digest": "6ab092db05ae2be9d53f1fbabe630100", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14786, "upload_time": "2019-02-28T13:05:46", "url": "https://files.pythonhosted.org/packages/ed/65/b0db31b1fcfd1e22a93708c52d68144e2b12aaf1713ca2ed5b81c5d73ca3/arith_lib-2.0.0.tar.gz" } ] }