{ "info": { "author": "lucasbrown.cit", "author_email": "lucasbrown.cit@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: Free For Educational Use", "License :: Free For Home Use", "License :: Free for non-commercial use", "License :: Freely Distributable", "License :: Freeware", "License :: OSI Approved", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Education", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Libraries" ], "description": "labmath version 1.1.1\n=====================\n\nThis is a module for basic math in the general vicinity of computational number theory. It includes functions associated with primality testing, integer factoring, prime counting, linear recurrences, modular square roots, generalized Pell equations, the classic arithmetical functions, continued fractions, partitions, St\u00f8rmer's theorem, smooth numbers, and Dirichlet convolution. Integer arithmetic is used wherever feasible.\n\nFunctions\n=========\n\nWe make a few imports:\n\n.. code:: python\n\n from multiprocessing import Process, Queue as mpQueue\n from itertools import chain, count, groupby, islice, tee, cycle, takewhile, compress, product, zip_longest\n from fractions import Fraction\n from random import randrange\n from math import log, sqrt; inf = float('inf')\n from heapq import merge\n\n try: from gmpy2 import mpz; mpzv, inttypes = 2, (int, type(mpz(1)))\n except ImportError: mpz, mpzv, inttypes = int, 0, (int,)\n\n labmathversion = \"1.1.0\"\n\nThe *new* functions provided by this module are as follows. Further details, including examples and input details, are available in docstrings and accessible via the built-in ``help`` function.\n\n.. code:: python\n\n primegen(limit=inf)\n\nGenerates primes less than the given limit (which may be infinite) lazily via a segmented sieve of Eratosthenes. Uses O(\u221a\\ *p*) memory, where *p* is the most recently yielded prime.\n\n.. code:: python\n\n rpn(instr)\n\nEvaluates a string in reverse Polish notation. The acceptable binary operators are ``+ - * / // % **`` and correspond directly to those same operators in Python3 source code. The acceptable unary operators are ``! #``. They are the factorial and primorial, respectively. There are three aliases: ``x`` for ``*`` , ``xx`` for ``**`` , and ``p!`` for ``#``.\n\n.. code:: python\n\n iterprod(l)\n\nProduct of the elements of any iterable. The product of an empty iterable is 1.\n\n.. code:: python\n\n listprod(l)\n\nProduct of the elements of a list. The product of the empty list is 1. We use a binary algorithm because this can easily generate huge numbers, and calling ``reduce(lambda x,y: x*y, a)`` in such situations is quite a bit slower due to the time-complexity of multiplication. However, the size of the problem required to make this superior to ``iterprod()`` is quite large, so ``iterprod()`` should usually be used instead.\n\n.. code:: python\n\n polyval(f, x, m=None)\n\nEvaluates a polynomial at a particular point, optionally modulo something.\n\n.. code:: python\n\n binomial(n,k)\n\nThe binomial coefficient nCr(``n``, ``k``).\n\n.. code:: python\n\n powerset(l)\n\nGenerates the powerset of a list, tuple, or string. The yielded objects are always lists.\n\n.. code:: python\n\n primephi(x, a, ps, phicache={})\n\nLegendre's phi function. Helper function for ``primepi``.\n\n.. code:: python\n\n primepi(x, ps=[], picache={}, phicache={}, sqrts={})\n\nComputes the number of primes \u2264 ``x`` via the Meissel-Lehmer method. The arguments ``ps``, ``pichache``, ``phicache``, and ``sqrts`` are for internal use only.\n\n.. code:: python\n\n primesum(n)\n\nSum of primes \u2264 ``n``.\n\n.. code:: python\n\n altseriesaccel(a, n)\n\nConvergence acceleration for alternating series. This is algorithm 1 from *Convergence Acceleration of Alternating Series* by Cohen, Villegas, and Zagier `(pdf)`__, with a minor tweak so that the *d*-value isn't computed via floating point.\n\n__ https://people.mpim-bonn.mpg.de/zagier/files/exp-math-9/fulltext.pdf\n\n.. code:: python\n\n riemannzeta(n, k=24)\n\nComputes the Riemann zeta function by applying ``altseriesaccel`` to the `Dirichlet eta function`__. Should be rather accurate throughout the complex plane except near ``n`` such that 1 = 2\\ :sup:`n-1`.\n\n__ https://en.wikipedia.org/wiki/Dirichlet_eta_function\n\n.. code:: python\n\n zetam1(n, k=24)\n\nComputes ``riemannzeta(n, k) - 1`` by applying ``altseriesaccel`` to the Dirichlet eta function. Designed to be accurate even when ``riemannzeta(n)`` is machine-indistinguishable from 1.0 --- in particular, when ``n`` is a large real number.\n\n.. code:: python\n\n riemannR(x, n=None, zc={})\n\nUses the `Gram series`__ to compute `Riemann's R function`__, which is a rather good approximation to ``primepi``. The argument ``zc`` is a cache of zeta values.\n\n__ http://mathworld.wolfram.com/GramSeries.html\n__ http://mathworld.wolfram.com/RiemannPrimeCountingFunction.html\n\n.. code:: python\n\n nthprimeapprox(n)\n\nProduces an integer that should be rather close to the ``n``\\ :sup:`th` prime by using binary splitting on Riemann's R function.\n\n.. code:: python\n\n nthprime(n)\n\nReturns the ``n``\\ :sup:`th` prime (counting 2 as #1). This is done with some efficiency by using ``nthprimeapprox`` as an initial estimate, computing ``primepi`` of that, and then sieving to remove the error.\n\n.. code:: python\n\n gcd(a, *r)\n\nGreatest common divisor of any number of values.\n\n.. code:: python\n\n xgcd(a, b)\n\nExtended Euclidean altorithm: returns a tuple (``g``, *x*, *y*) such that ``g`` = gcd(``a``, ``b``) and ``g`` = ``a``\u00b7*x* + ``b``\u00b7*y*.\n\n.. code:: python\n\n modinv(a, m)\n\nReturns the inverse of ``a`` modulo ``m``, normalized to lie between ``0`` and ``m-1``. If ``a`` is not coprime to ``m``, returns 1.\n\n.. code:: python\n\n crt(rems, mods)\n\nReturns the unique integer *c* in ``range(iterprod(mods))`` such that *c* \u2261 *x* (mod *y*) for (*x*, *y*) in ``zip(rems, mods)``. All elements of ``mods`` must be pairwise coprime.\n\n.. code:: python\n\n lcm(a, *r)\n\nThe least common multiple of any number of values.\n\n.. code:: python\n\n isqrt(n)\n\nGreatest integer whose square is \u2264 ``n``.\n\n.. code:: python\n\n introot(n, r=2)\n\nFor non-negative ``n``, returns the greatest integer \u2264 the rth root of ``n``. For negative ``n``, returns the least integer \u2265 the ``r``\\ :sup:`th` root of ``n``, or ``None`` if ``r`` is even.\n\n.. code:: python\n\n ispower(n, r=0)\n\nIf ``r`` = 0: If ``n`` is a perfect power, return a tuple containing the largest integer that, when squares/cubed/etc, yields ``n`` as the first component and the relevant power as the second component. If ``n`` is not a perfect power, return ``None``.\n\nIf ``r`` > 0: We check whether ``n`` is a perfect ``r``\\ :sup:`th` power; we return its ``r``\\ :sup:`th` root if it is and ``None`` if it isn't.\n\n.. code:: python\n\n ilog(x, b)\n\nGreatest integer *k* such that ``b``\\ :sup:`k` \u2264 ``x``.\n\n.. code:: python\n\n fibogen()\n\nGenerates the Fibonacci numbers, starting with 0 and 1.\n\n.. code:: python\n\n fibo(n, f={0:0, 1:1, 2:1})\n\nEfficiently extracts the ``n``\\ :sup:`th` Fibonacci number, indexed so that ``fibo(0)`` = 0 and ``fibo(1)`` = ``fibo(2)`` = 1. The argument ``f`` is used for memoization. We compute O(log(``n``)) earlier Fibonaccis along the way. This is, in the big-O sense, just about as fast as possible.\n\n.. code:: python\n\n fibomod(n, m, f={0:0, 1:1, 2:1})\n\nEfficiently extracts the nth Fibonacci number modulo ``m``, indexed so that ``fibo(0)`` = 0 and ``fibo(1)`` == ``fibo(2)`` = 1. The argument ``f`` is used for memoization. We compute O(log(``n``)) earlier Fibonaccis along the way. This is the asymptotically fastest algorithm.\n\n.. code:: python\n\n lucaschain(n, x0, x1, op1, op2)\n\nAlgorithm 3.6.7 from *Prime Numbers: A Computational Perspective* by Crandall & Pomerance (2\\ :sup:`nd` edition): Evaluation of a binary Lucas chain. To quote their description:\n\n For a sequence *x*\\ :sub:`0`, *x*\\ :sub:`1`, ... with a rule for computing *x*\\ :sub:`2j` from *x*\\ :sub:`j` and a rule for computing *x*\\ :sub:`2j+1` from *x*\\ :sub:`j` and *x*\\ :sub:`j+1`, this algorithm computes (*x*\\ :sub:`n`, *x*\\ :sub:`n+1`) for a given positive integer *n*. We have *n* in binary as (*n*\\ :sub:`0`, *n*\\ :sub:`1`, ..., *n*\\ :sub:`b-1`) with *n*\\ :sub:`0` being the low-order bit. We write the rules as follows: *x*\\ :sub:`2j` = op1(*x*\\ :sub:`j`) and *x*\\ :sub:`2j+1` = op2(*x*\\ :sub:`j`, *x*\\ :sub:`j+1`).\n\n.. code:: python\n\n lucasgen(P, Q):\n\nGenerates the Lucas U- and V-sequences with parameters (``P``, ``Q``).\n\n.. code:: python\n\n lucas(k, P, Q)\n\nEfficiently computes the ``k``\\ :sup:`th` terms in the Lucas U- and V-sequences U(``P``, ``Q``) and V(``P``, ``Q``). More explicitly, if\n\n U\\ :sub:`0`, U\\ :sub:`1`, V\\ :sub:`0`, V\\ :sub:`1` = 0, 1, 2, ``P``\n\nand we have the recursions\n\n U\\ :sub:`n` = ``P`` \u00b7 U\\ :sub:`n-1` - ``Q`` \u00b7 U\\ :sub:`n-2`\n\n V\\ :sub:`n` = ``P`` \u00b7 V\\ :sub:`n-1` - ``Q`` \u00b7 V\\ :sub:`n-2`\n\nthen we compute U\\ :sub:`k` and V\\ :sub:`k` in O(ln(``k``)) arithmetic operations. If ``P``\\ :sup:`2` \u2260 4\u00b7``Q``, then these sequences grow exponentially, so the number of bit operations is anywhere from O(``k`` \u00b7 ln(``k``)\\ :sup:`2` \u00b7 ln(ln(``k``))) to O(``k``\\ :sup:`2`) depending on how multiplication is handled. We recommend using MPZs when ``k`` > 100 or so. We divide by ``P``\\ :sup:`2` - 4\u00b7``Q`` at the end, so we handle separately the case where this is zero.\n\n.. code:: python\n\n binlinrecgen(P, Q, a, b)\n\nThe general binary linear recursion. Exactly like ``lucasgen``, except we only compute one sequence, and we supply the seeds.\n\n.. code:: python\n\n binlinrec(k, P, Q, a, b)\n\nThe general binary linear recursion. Exactly like ``lucas``, except we compute only one sequence, and we supply the seeds.\n\n.. code:: python\n\n linrecgen(a, b, m=None)\n\nThe general homogenous linear recursion: we generate in order the sequence defined by\n\n *x*\\ :sub:`n+1` = ``a``\\ :sub:`k` \u00b7 *x*\\ :sub:`n` + ``a``\\ :sub:`k-1` \u00b7 *x*\\ :sub:`n-1` + ... + ``a``\\ :sub:`0` \u00b7 *x*\\ :sub:`n-k`,\n\nwhere the initial values are [*x*\\ :sub:`0`, ..., *x*\\ :sub:`k`] = ``b``. If ``m`` is supplied, then we compute the sequence modulo ``m``. The terms of this sequence usually grow exponentially, so computing a distant term incrementally by plucking it out of this generator takes O(``n``\\ :sup:`2`) bit operations. Extractions of distant terms should therefore be done via ``linrec``, which takes anywhere from O(``n`` \u00b7 ln(``n``)\\ :sup:`2` \u00b7 ln(ln(``n``))) to O(``n``\\ :sup:`2`) bit operations depending on how multiplication is handled.\n\n.. code:: python\n\n linrec(n, a, b, m=None)\n\nThe general homogeneous linear recursion. If ``m`` is supplied, terms are computed modulo ``m``. We use matrix methods to efficiently compute the ``n``\\ :sup:`th` term of the recursion\n\n *x*\\ :sub:`n+1` = ``a``\\ :sub:`k` \u00b7 *x*\\ :sub:`n` + ``a``\\ :sub:`k-1` \u00b7 *x*\\ :sub:`n-1` + ... + ``a``\\ :sub:`0` \u00b7 *x*\\ :sub:`n-k`,\n\nwhere the initial values are [*x*\\ :sub:`0`, ..., *x*\\ :sub:`k`] = ``b``.\n\n.. code:: python\n\n legendre(a, p)\n\nLegendre symbol (``a`` | ``p``): 1 if ``a`` is a quadratic residue mod ``p``, -1 if it isn't, and 0 if ``a`` \u2261 0 (mod ``p``). Not meaningful if ``p`` isn't prime.\n\n.. code:: python\n\n jacobi(a, n)\n\nThe Jacobi symbol (``a`` | ``n``).\n\n.. code:: python\n\n kronecker(a, n)\n\nThe Kronecker symbol (``a`` | ``n``). Note that this is the generalization of the Jacobi symbol, *not* the Dirac-delta analogue.\n\n.. code:: python\n\n fermat_prp(n, b)\n\nFermat's primality test.\n\n.. code:: python\n\n sprp(n, b)\n\nThe strong probable primality test (aka single-round Miller-Rabin).\n\n.. code:: python\n\n mrab(n, basis)\n\nMiller-Rabin probable primality test.\n\n.. code:: python\n\n miller(n)\n\nMiller's primality test. If the extended Riemann hypothesis (the one about Dirichlet L-functions) is true, then this test is deterministic.\n\n.. code:: python\n\n lprp(n, a, b)\n\nLucas probable primality test as described in *Prime Numbers: A Computational Perspective* by Crandall & Pomerance (2\\ :sup:`nd` edition).\n\n.. code:: python\n\n lucasmod(k, P, Q, m)\n\nEfficiently computed the ``k``\\ :sup:`th` terms of Lucas U- and V-sequences modulo ``m`` with parameters (``P``, ``Q``). Currently just a helper function for ``slprp`` and ``xslprp``. Will be upgraded to full status when the case ``gcd(D,m)!=1`` is handled properly.\n\n.. code:: python\n\n slprp(n, a, b)\n\nStrong lucas probable primality test as described on Wikipedia. Its false positives are a strict subset of those for ``lprp`` with the same parameters.\n\n.. code:: python\n\n xslprp(n, a)\n\nExtra strong Lucas probable primality test as described on Wikipedia. Its false positives are a strict subset of those for ``slprp`` (and therefore ``lprp``) with parameters (``a``, 1).\n\n.. code:: python\n\n bpsw(n)\n\nThe Baille-Pomerance-Selfridge-Wagstaff probable primality test. Infinitely many false positives are conjectured to exist, but none are known, and the test is known to be deterministic below 2\\ :sup:`64`.\n\n.. code:: python\n\n qfprp(n, a, b)\n\nQuadratic Frobenius probable primality test as described in *Prime Numbers: A Computational Perspective* by Crandall & Pomerance (2\\ :sup:`nd` edition).\n\n.. code:: python\n\n polyaddmodp(a, b, p)\n\nAdds two polynomials and reduces their coefficients mod ``p``. Polynomials are written as lists of integers with the constant terms first. If the high-degree coefficients are zero, those terms will be deleted from the answer so that the highest-degree term is nonzero. We assume that the inputs also satisfy this property. The zero polynomial is represented by the empty list. If one of the input polynomials is ``None``, we return ``None``.\n\n.. code:: python\n\n polysubmodp(a, b, p)\n\nSubtracts the polynomial ``b`` from ``a`` and reduces their coefficients mod ``p``. Polynomials are written as lists of integers with the constant terms first. If the high-degree coefficients are zero, those terms will be deleted from the answer so that the highest-degree term is nonzero. We assume that the inputs also satisfy this property. The zero polynomial is represented by the empty list. If one of the input polynomials is ``None``, we return ``None``.\n\n.. code:: python\n\n polymulmodp(a, b, p)\n\nMultiplies the polynomials ``a`` and ``b`` and reduces their coefficients mod ``p``. Polynomials are written as lists of integers with the constant terms first. If the high-degree coefficients are zero, those terms will be deleted from the answer so that the highest-degree term is nonzero. We assume that the inputs also satisfy this property. The zero polynomial is represented by the empty list. If one of the input polynomials is ``None``, we return ``None``.\n\n.. code:: python\n\n polydivmodmodp(a, b, p)\n\nDivides the polynomial ``a`` by the polynomial ``b`` and returns the quotient and remainder. The coefficients are interpreted mod ``p``. Polynomials are written as lists of integers with the constant terms first. If the high-degree coefficients are zero, those terms will be deleted from the answer so that the highest-degree term is nonzero. We assume that the inputs also satisfy this property. The zero polynomial is represented by the empty list. If one of the input polynomials is ``None``, we return ``None``. The result is not guaranteed to exist; in such cases we return ``(None, None)``.\n\n.. code:: python\n\n gcmd(f, g, p)\n\nComputes the greatest common monic divisor of the polynomials ``f`` and ``g``. The coefficients are interpreted mod ``p``. Polynomials are written as lists of integers with the constant terms first. If the high-degree coefficients are zero, those terms will be deleted from the answer so that the highest-degree term is nonzero. We assume that the inputs also satisfy this property. The zero polynomial is represented by the empty list. If one of the input polynomials is ``None``, or if both input polynomials are ``[]``, we return ``None``. The result is not guaranteed to exist; in such cases, we return ``None``. Coded after algorithm 2.2.1 from *Prime Numbers: A Computational Perspective* by Crandall & Pomerance (2\\ :sup:`nd` edition).\n\n.. code:: python\n\n polypowmodpmodpoly(a, e, p, f)\n\nComputes the remainder when the polynomial ``a`` is raised to the ``e``\\ :sup:`th` power and reduced modulo ``f``. The coefficients are interpreted mod ``p``. Polynomials are written as lists of integers with the constant terms first. If the high-degree coefficients are zero, those terms will be deleted from the answer so that the highest-degree term is nonzero. We assume that the inputs also satisfy this property. The zero polynomial is represented by the empty list. If one of the input polynomials is ``None``, or if ``f == []``, we return ``None``. The answer is not guaranteed to exist. In such cases, we return ``None``.\n\n.. code:: python\n\n frobenius_prp(n, poly, strong=False)\n\nGrantham's general Frobenius probable primality test, in both the strong and weak versions, as described in `his paper introducing the test`__.\n\n__ https://doi.org/10.1090/S0025-5718-00-01197-2\n\n.. code:: python\n\n isprime(n, tb=(3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59))\n\nThe workhorse primality test. It is a BPSW primality test variant: we use the strong Lucas PRP test and preface the computation with trial division for speed. No composites are known to pass the test, though it is suspected that infinitely many will do so. There are definitely no such errors below 2\\ :sup:`64`. This function is mainly a streamlined version of ``bpsw``.\n\n.. code:: python\n\n isprime_mersenne(p)\n\nThe Lucas-Lehmer test. Deterministically and efficiently checks whether the Mersenne number 2\\ :sup:`p`-1 is prime.\n\n.. code:: python\n\n nextprime(n)\n\nSmallest prime strictly greater than ``n``.\n\n.. code:: python\n\n prevprime(n)\n\nLargest prime strictly less than ``n``, or ``None`` if no such prime exists.\n\n.. code:: python\n\n randprime(digits, base=10, primetest=isprime)\n\nReturns a random prime with the specified number of digits when rendered in the specified base.\n\n.. code:: python\n\n randomfactored(n, primetest=isprime)\n\nEfficiently generates an integer selected uniformly from the range [1, ``n``] with its factorization. Uses Adam Kalai's algorithm, which uses in the average case O(log(``n``)\\ :sup:`2`) primality tests. When called with the default primality test, this then uses O(log(``n``)\\ :sup:`3`) arithmetic operations, which in turn results in just over O(log(``n``)\\ :sup:`4`) to O(log(``n``)\\ :sup:`5`) bit operations, depending on how multiplication is handled.\n\n.. code:: python\n\n sqrtmod_prime(a, p)\n\nFinds *x* such that *x*\\ :sup:`2` \u2261 ``a`` (mod ``p``). We assume that ``p`` is a prime and ``a`` is a quadratic residue modulo ``p``. If any of these conditions is false, then the return value is meaningless.\n\n.. code:: python\n\n cbrtmod_prime(a, p)\n\nReturns in a sorted list all cube roots of a mod p. There are a bunch of easily-computed special formulae for various cases with p != 1 (mod 9); we do those first, and then if p == 1 (mod 9) we use Algorithm 4.2 in `Taking Cube Roots in Zm`__ by Padro and Saez, which is essentially a variation on the Tonelli-Shanks algorithm for modular square roots.\n\n__ https://doi.org/10.1016/S0893-9659(02)00031-9\n\n.. code:: python\n\n pollardrho_brent(n)\n\nFactors integers using Brent's variation of Pollard's rho algorithm. If ``n`` is prime, we immediately return ``n``; if not, we keep chugging until a nontrivial factor is found.\n\n.. code:: python\n\n pollard_pm1(n, B1=100, B2=1000)\n\nInteger factoring function. Uses Pollard's p-1 algorithm. Note that this is only efficient if the number to be factored has a prime factor *p* such that *p*-1's largest prime factor is \"small\".\n\n.. code:: python\n\n mlucas(v, a, n)\n\nHelper function for ``williams_pp1``. Multiplies along a Lucas sequence modulo ``n``.\n\n.. code:: python\n\n williams_pp1(n)\n\nInteger factoring function. Uses Williams' p+1 algorithm, single-stage variant. Note that this is only efficient when the number to be factored has a prime factor *p* such that *p*\\ +1's largest prime factor is \"small\".\n\n.. code:: python\n\n ecadd(p1, p2, p0, n)\n\nHelper function for ``ecm``. Adds two points on a Montgomery curve modulo ``n``.\n\n.. code:: python\n\n ecdub(p, A, n)\n\nHelper function for ``ecm``. Doubles a point on a Montgomery curve modulo ``n``.\n\n.. code:: python\n\n ecmul(m, p, A, n)\n\nHelper function for ``ecm``. Multiplies a point on Montgomery curve by an integer modulo ``n``.\n\n.. code:: python\n\n secm(n, B1, B2, seed)\n\nSeeded elliptic curve factoring using the two-phase algorithm on Montgomery curves. Helper function for ``ecm``. Returns a possibly-trivial divisor of ``n`` given two bounds and a seed.\n\n.. code:: python\n\n ecmparams(n)\n\nGenerator of parameters to use for ``secm``.\n\n.. code:: python\n\n ecm(n, paramseq=ecmparams, nprocs=1)\n\nInteger factoring via elliptic curves using the two-phase algorithm on Montgomery curves, and optionally uses multiple processes. This is a shell function that repeatedly calls ``secm`` using parameters provided by ``ecmparams``; the actual factoring work is done there. Multiprocessing incurs relatively significant overhead, so when ``nprocs==1`` (default), we don't call the multiprocessing functions.\n\n.. code:: python\n\n modinv_mpqs(a, m)\n\nHelper function for ``mpqs``. Returns a modular inverse normalized to minimize absolute value.\n\n.. code:: python\n\n mpqs(n)\n\nFactors an integer via the multiple-polynomial quadratic sieve. Most of this function is copied verbatim from https://codegolf.stackexchange.com/a/9088.\n\n.. code:: python\n\n multifactor(n, methods)\n\nInteger factoring function. Uses several methods in parallel. Waits for one of them to return, kills the rest, and reports.\n\n.. code:: python\n\n primefac(n, trial=1000, rho=42000, primetest=isprime, methods=(pollardrho_brent,))\n\nThe workhorse integer factorizer. Generates the prime factors of the input. Factors that appear *x* times are yielded *x* times.\n\n.. code:: python\n\n factorint(n, trial=1000, rho=42000, primetest=isprime, methods=(pollardrho_brent,))\n\nCompiles the output of ``primefac`` into a dictionary with primes as keys and multiplicities as values.\n\n.. code:: python\n\n factorsieve(stop)\n\nUses a sieve to compute the factorizations of all whole numbers strictly less than the input. This uses a lot of memory; if you aren't after the factors directly, it's usually better to write a dedicated function for whatever it is that you actually want.\n\n.. code:: python\n\n divisors(n)\n\nGenerates all natural numbers that evenly divide ``n``. The output is not necessarily sorted.\n\n.. code:: python\n\n divisors_factored(n)\n\nGenerates the divisors of ``n``, written as their prime factorizations in factorint format.\n\n.. code:: python\n\n divcount(n)\n\nCounts the number of divisors of ``n``.\n\n.. code:: python\n\n divsigma(n, x=1)\n\nSum of divisors of a natural number, raised to the *x*\\ :sup:`th` power. The conventional notation for this in mathematical literature is \u03c3\\ :sub:`x`\\ (``n``), hence the name of this function.\n\n.. code:: python\n\n divcountsieve(stop)\n\nUses a sieve to compute the number of divisors of all whole numbers strictly less than the input.\n\n.. code:: python\n\n totient(n, k=1)\n\nJordan's totient function: the number of ``k``-tuples of positive integers all \u2264 ``n`` that form a coprime (``k``\\ +1)-tuple together with ``n``. When ``k`` = 1, this is Euler's totient: the number of numbers less than a number that are relatively prime to that number.\n\n.. code:: python\n\n totientsieve(n)\n\nUses a sieve to compute the totients up to (and including) ``n``.\n\n.. code:: python\n\n totientsum(n)\n\nComputes ``sum(totient(n) for n in range(1, n+1))`` efficiently.\n\n.. code:: python\n\n mobius(n)\n\nThe M\u00f6bius function of ``n``: 1 if ``n`` is squarefree with an even number of prime factors, -1 if ``n`` is squarefree with an odd number of prime factors, and 0 if ``n`` has a repeated prime factor.\n\n.. code:: python\n\n mobiussieve(stop)\n\nUses a sieve to compute the M\u00f6bius function of all whole numbers strictly less than the input.\n\n.. code:: python\n\n liouville(n)\n\nThe Liouville lambda function of ``n``: the strongly multiplicative function that is -1 on the primes.\n\n.. code:: python\n\n polyroots_prime(g, p, sqfr=False)\n\nGenerates with some efficiency and without multiplicity the zeros of a polynomial modulo a prime. Coded after algorithm 2.3.10 from *Prime Numbers: A Computational Perspective* by Crandall & Pomerance (2\\ :sup:`nd` edition), which is essentially Cantor-Zassenhaus.\n\n.. code:: python\n\n hensel(f, p, k, given=None)\n\nUses Hensel lifting to generate with some efficiency all zeros of a polynomial modulo a prime power.\n\n.. code:: python\n\n sqrtmod(a, n)\n\nComputes all square roots of ``a`` modulo ``n`` and returns them in a sorted list.\n\n.. code:: python\n\n polyrootsmod(pol, n)\n\nComputes the zeros of a polynomial modulo an integer. We do this by factoring the modulus, solving modulo the prime power factors, and putting the results back together via the Chinese Remainder Theorem.\n\n.. code:: python\n\n PQa(P, Q, D)\n\nGenerates some sequences related to simple continued fractions of certain quadratic surds. A helper function for ``pell``. Let ``P``, ``Q``, and ``D`` be integers such that ``Q`` \u2260 0, ``D`` > 0 is a nonsquare, and ``P``\\ :sup:`2` \u2261 ``D`` (mod ``Q``). We yield a sequence of tuples (*B*\\ :sub:`i`, *G*\\ :sub:`i`, *P*\\ :sub:`i`, *Q*\\ :sub:`i`) where *i* is an index counting up from 0, *x* = (``P``\\ +\u221a\\ ``D``)/``Q`` = [*a*\\ :sub:`0`; *a*\\ :sub:`1`, *a*\\ :sub:`2`, ...], (*P*\\ :sub:`i`\\ +\u221a\\ ``D``))/*Q*\\ :sub:`i` is the *i*\\ :sup:`th` complete quotient of *x*, and *B*\\ :sub:`i` is the denominator of the *i*\\ :sup:`th` convergent to *x*. For full details, see https://www.jpr2718.org/pell.pdf.\n\n.. code:: python\n\n pell(D, N)\n\nThis function solves the generalized Pell equation: we find all non-negative integers (*x*, *y*) such that *x*\\ :sup:`2` - ``D`` \u00b7 *y*\\ :sup:`2` = ``N``. We have several cases:\n\nCase 1: ``N`` = 0. We solve *x*\\ :sup:`2` = ``D`` \u00b7 *y*\\ :sup:`2`. (0,0) is always a solution.\n\n Case 1a: If ``D`` is a nonsquare, then there are no further solutions.\n\n Case 1b: If ``D`` is a square, then there are infinitely many solutions, parametrized by (*t*\u00b7\u221a\\ ``D``, *t*).\n\nCase 2: ``N`` \u2260 0 = ``D``. We solve *x*\\ :sup:`2` = ``N``.\n\n Case 2a: If ``N`` is a nonsquare, then there are no solutions.\n\n Case 2b: If ``N`` is a square, then there are infinitely many solutions, parametrized by (\u221a\\ ``N``, *t*).\n\nCase 3: ``N`` \u2260 0 > ``D``. We solve *x*\\ :sup:`2` + \\|\\ ``D``\\| \u00b7 *y*\\ :sup:`2` = ``N``. The number of solutions will be finite.\n\nCase 4: ``N`` \u2260 0 < ``D``. We find lattice points on a hyperbola.\n\n Case 4a: If ``D`` is a square, then the number of solutions will be at most finite. This case is solved by factoring.\n\n Case 4b: If ``D`` is a nonsquare, then we run the PQa/LMM algorithms: we produce a set of primitive solutions; if this set is empty, there are no solutions; if this set has members, an ininite set of solutions can be produced by repeatedly composing them with the fundamental solution of *x*\\ :sup:`2` - ``D`` \u00b7 *y*\\ :sup:`2` = 1.\n\nReferences:\n\n* http://www.jpr2718.org/pell.pdf\n* http://www.offtonic.com/blog/?p=12\n* http://www.offtonic.com/blog/?p=18\n\nInput: ``D``, ``N`` -- integers\n\nOutput:\n\n A 3-tuple.\n\n If the number of solutions is finite, it is ``(None, z, None)``, where ``z`` is the sorted list of all solutions.\n\n If the number of solutions is infinite and the equation is degenerate, it's ``(gen, None, None)``, where ``gen`` yields all solutions.\n\n If the number of solutions if infinite and the equation is nondegenerate, it is ``(gen, z, f)``, where ``z`` is the set of primitive solutions, represented as a sorted list, and ``f`` is the fundamental solution --- i.e., ``f`` is the primitive solution of *x*\\ :sup:`2` - ``D`` \u00b7 *y*\\ :sup:`2` = 1.\n\n Note that we can check the infinitude of solutions by calling ``bool(pell(D,N)[0])``.\n\n.. code:: python\n\n simplepell(D, bail=inf)\n\nGenerates the positive solutions of *x*\\ :sup:`2` - ``D`` \u00b7 *y*\\ :sup:`2` = 1. We use some optimizations specific to this case of the Pell equation that makes this more efficient than calling ``pell(D,1)[0]``. Note that this function is not equivalent to calling ``pell(D,1)[0]``: ``pell`` is concerned with the general equation, which may or may not have trivial solutions, and as such yields all non-negative solutions, whereas this function is concerned only with the simple Pell equation, which always has an infinite family of positive solutions generated from a single primitive solution and always has the trivial solution (1,0).\n\nWe yield only those solutions with *x* \u2264 ``bail``.\n\n.. code:: python\n\n carmichael(n)\n\nThe Carmichael lambda function: the smallest positive integer *m* such that *a*\\ :sup:`m` \u2261 1 (mod ``n``) for all *a* such that gcd(*a*, ``n``) = 1. Also called the reduced totient or least universal exponent.\n\n.. code:: python\n\n multord(b, n)\n\nComputes the multiplicative order of ``b`` modulo ``n``; i.e., finds the smallest *k* such that ``b``\\ :sup:`k` \u2261 1 (mod ``n``).\n\n.. code:: python\n\n pythags_by_perimeter(p)\n\nGenerates all Pythagorean triples of a given perimeter by examining the perimeter's factors.\n\n.. code:: python\n\n collatz(n)\n\nGenerates the Collatz sequence initiated by ``n``. Stops after yielding 1.\n\n.. code:: python\n\n sqrtcfrac(n)\n\nComputes the simple continued fraction for \u221a\\ ``n``. We return the answer as ``(isqrt(n), [a,b,c,...,d])``, where ``[a,b,c,...,d]`` is the minimal reptend.\n\n.. code:: python\n\n convergents(a)\n\nGenerates the convergents of a simple continued fraction.\n\n.. code:: python\n\n contfrac_rat(n, d)\n\nReturns the simple continued fraction of the rational number ``n``/``d``.\n\n.. code:: python\n\n ngonal(x, n)\n\nReturns the ``x``\\ :sup:`th` ``n``-gonal number. Indexing begins with 1 so that ``ngonal(1, n)`` = 1 for all applicable ``n``.\n\n.. code:: python\n\n is_ngonal(p, n)\n\nChecks whether ``p`` is an ``n``-gonal number.\n\n.. code:: python\n\n partitions(n, parts=[1])\n\nComputes with some semblance of efficiency the number of additive partitions of an integer. The ``parts`` argument is for memoization.\n\n.. code:: python\n\n partgen(n)\n\nGenerates partitions of integers in ascending order via an iterative algorithm. It is the fastest known algorithm as of June 2014.\n\n.. code:: python\n\n partconj(p)\n\nComputes the conjugate of a partition.\n\n.. code:: python\n\n farey(n)\n\nGenerates the Farey sequence of maximum denominator ``n``. Includes 0/1 and 1/1.\n\n.. code:: python\n\n fareyneighbors(n, p, q)\n\nReturns the neighbors of ``p``/``q`` in the Farey sequence of maximum denominator ``n``.\n\n.. code:: python\n\n ispractical(n)\n\nTests whether ``n`` is a practical number -- i.e., whether every integer from 1 through ``n`` (inclusive) can be written as a sum of divisors of ``n``. These are also called panarithmic numbers.\n\n.. code:: python\n\n hamming(ps, *ps2)\n\nGenerates all ``ps``-smooth numbers, where ``ps`` is a list of primes.\n\n.. code:: python\n\n arithmeticderivative(n)\n\nThe arithmetic derivative of ``n``: if ``n`` is prime, then ``n``' = 1; if -2 < ``n`` < 2, then ``n``' = 0; if ``n`` < 0, then ``n``' = -(-``n``)'; and (*ab*)' = *a*'\u00b7*b* + *b*'\u00b7*a*.\n\n.. code:: python\n\n perfectpowers()\n\nGenerates the sequence of perfect powers without multiplicity.\n\n.. code:: python\n\n sqfrgen(ps)\n\nGenerates the squarefree products of the elements of ``ps``.\n\n.. code:: python\n\n sqfrgenb(ps, b, k=0, m=1)\n\nGenerates the squarefree products of elements of ``ps``. Does not yield anything > ``b``. For best performance, ``ps`` should be sorted in decreasing order.\n\n.. code:: python\n\n stormer(ps, *ps2, abc=None)\n\nSt\u00f8rmer's theorem asserts that for any given set ``ps`` of prime numbers, there are only finitely many pairs of consecutive integers that are both ``ps``-smooth; the theorem also gives an effective algorithm for finding them. We implement Lenstra's improvement to this theorem.\n\nThe ``abc`` argument indicates that we are to assume an effective abc conjecture of the form *c* < ``abc[0]`` \u00b7 rad(*a*\u00b7*b*\u00b7*c*)\\ :sup:`abc[1]`. This enables major speedups. If ``abc`` is ``None``, then we make no such assumptions.\n\n.. code:: python\n\n quadintroots(a, b, c)\n\nGiven integers ``a``, ``b``, and ``c``, we return in a tuple all distinct integers *x* such that ``a``\u00b7*x*\\ :sup:`2` + ``b``\u00b7*x* + ``c`` = 0. This is primarily a helper function for ``cubicintrootsgiven`` and ``cubicintroots``.\n\n.. code:: python\n\n cubicintrootsgiven(a, b, c, d, r)\n\nGiven integers ``a``, ``b``, ``c``, ``d``, and ``r`` such that ``a``\u00b7``r``\\ :sup:`3` + ``b``\u00b7``r``\\ :sup:`2` + ``c``\u00b7``r`` + ``d`` = 0, we find the cubic's other two roots an return in a tuple all distinct integer roots (including ``r``). This is primarily a helper function for ``cubicintroots``.\n\n.. code:: python\n\n cubicintroots(a, b, c, d)\n\nGiven integers ``a``, ``b``, ``c``, ``d``, we return in a tuple all distinct integer roots of ``a``\u00b7*x*\\ :sup:`3` + ``b``\u00b7*x*\\ :sup:`2` + ``c``\u00b7*x* + ``d``. This is primarily a helper function for ``isprime_nm1``.\n\n.. code:: python\n\n isprime_nm1(n, fac=None)\n\nThe *n*-1 primality test: given an odd integer ``n`` > 214 and a fully-factored integer *F* such that *F* divides ``n``-1 and *F* > ``n``\\ :sup:`0.3`, we quickly determine without error whether ``n`` is prime. If the provided (partial) factorization of ``n``-1 is insufficient, we compute the factorization ourselves.\n\n.. code:: python\n\n isprime_np1(n, fac=None)\n\nThe *n*\\ +1 primality test: given an odd integer ``n`` > 214 and a fully-factored integer *F* such that *F* divides ``n``\\ +1 and *F* > ``n``\\ :sup:`0.3`, we quickly determine without error whether ``n`` is prime. If the provided (partial) factorization of ``n``\\ +1 is insufficient, we compute the factorization ourselves.\n\n.. code:: python\n\n mulparts(n, r=None, nfac=None)\n\nGenerates all ordered ``r``-tuples of positive integers whose product is ``n``. If ``r`` is ``None``, then we generate all such tuples (regardless of size) that do not contain 1.\n\n.. code:: python\n\n dirconv(f, g, ffac=False, gfac=False)\n\nThis returns a function that is the Dirichlet convolution of ``f`` and ``g``. When called with the keyword arguments at their default values, this is equivalent to the expression ``lambda n: sum(f(d) * g(n//d) for d in divisors(n))``. If ``f`` or ``g`` needs to factor its argument, such as ``f == totient`` or ``g == mobius`` or something like that, then that lambda expression calls the factorizer a lot more than it needs to --- we're already factoring ``n``, so instead of feeding those functions the integer forms of ``n``'s factors, we can instead pass ``ffac=True`` or ``gfac=True`` when ``dirconv`` is called and we will call ``divisors_factored(n)`` instead and feed those factored divisors into ``f`` or ``g`` as appropriate. This optimization becomes more noticeable as the factoring becomes more difficult.\n\n.. code:: python\n\n dirichletinverse(f)\n\nComputes the Dirichlet inverse of the input function ``f``. Mathematically, functions *f* such that *f*\\ (1) = 0 have no Dirichlet inverses due to a division by zero. This is reflected in this implementation by raising a ``ZeroDivisionError`` when attempting to evaluate ``dirichletinverse(f)(n)`` for any such ``f`` and any ``n``. If ``f``\\ (1) is neither 1 nor -1, then ``dirichletinverse(f)`` will return ``Fraction`` objects (as imported from the ``fractions`` module).\n\n.. code:: python\n\n dirichletroot(f, r, val1)\n\nComputes the ``r``\\ :sup:`th` Dirichlet root of the input function ``f`` whose value at 1 is ``val1``. More precisely, let ``f`` be a function on the positive integers, let ``r`` be a positive integer, and let ``val1``\\ :sup:`r` = ``f``\\ (1). Then we return the unique function ``g`` such that ``f`` = ``g`` * ``g`` * ... * ``g``, where ``g`` appears ``r`` times and * represents Dirichlet convolution. The values returned will be ``Fraction`` objects (as imported from the ``fractions`` module).\n\n.. code:: python\n\n determinant(M)\n\nComputes the determinant of a matrix via the Schur determinant identity.\n\n.. code:: python\n\n discriminant(coefs)\n\nComputes the discriminant of a polynomial. The input list is ordered from lowest degree to highest --- i.e., ``coefs[k]`` is the coefficient of the *x*\\ :sup:`k` term. For low-degree polynomials, explicit formulae are used; for degrees 5 and higher, we compute it by taking the determinant (using this package's determinant() function) of the Sylvester matrix of the input and its derivative. This in turn is calculated by the Schur determinant identity. Note that this has the effect of setting the discriminant of a linear polynomial to 1 (which is conventional) and that of a constant to 0.\n\n.. code:: python\n\n egypt_short(n, d, terms=0, minden=1)\n\nGenerates all shortest Egyptian fractions for ``n``/``d`` using at least the indicated number of terms and whose denominators are all \u2265 minden. No algorithm is known for this problem that significantly improves upon brute force, so this can take impractically long times on even modest-seeming inputs.\n\n.. code:: python\n\n egypt_greedy(n, d)\n\nThe greedy algorithm for Egyptian fraction expansion; also called the Fibonacci-Sylvester algorithm.\n\n\nDependencies\n------------\n\nThis package imports items from ``multiprocessing``, ``itertools``, ``fractions``, ``random``, ``math``, and ``heapq``. These are all in the Python standard library.\n\nWe attempt to import ``mpz`` from ``gmpy2``, but this is purely for efficiency: if this import fails, we simply set ``mpz = int``.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.python.org/pypi/labmath", "keywords": "math mathematics computational number theory integer factoring factorization primes prime numbers legendre symbol jacobi symbol kronecker symbol elliptic curve method bpsw miller rabin quadratic frobenius prp sprp lprp slprp xslprp primality testing linear recurrences lucas sequences modular square root generalized Pell equations divisor counting function euler's totient function mobius function m\u00f6bius function continued fractions partitions stormer's theorem st\u00f8rmer's theorem smooth numbers Dirichlet convolution", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "labmath", "package_url": "https://pypi.org/project/labmath/", "platform": "", "project_url": "https://pypi.org/project/labmath/", "project_urls": { "Homepage": "https://pypi.python.org/pypi/labmath" }, "release_url": "https://pypi.org/project/labmath/1.2.0/", "requires_dist": null, "requires_python": "", "summary": "Module for basic math in the general vicinity of computational number theory", "version": "1.2.0" }, "last_serial": 4500731, "releases": { "1.0.7": [ { "comment_text": "", "digests": { "md5": "3e71cb619688555eeb2219c8eef10871", "sha256": "761b46d330c5e794ee006f809ae08a7500da8f781da678b811f563169aed10fa" }, "downloads": -1, "filename": "labmath-1.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "3e71cb619688555eeb2219c8eef10871", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 66663, "upload_time": "2018-03-01T22:37:55", "url": "https://files.pythonhosted.org/packages/70/ad/7792a71775e5fa934e1a7f0e1f234b17e9a968a14b26bcace777e557aa5d/labmath-1.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "749f13faa8779b5597607aedad30886b", "sha256": "f519145f1ee7408ce6ecbfac9b06aaba10c7495eae44f4f49cc5124d7fd0e1bf" }, "downloads": -1, "filename": "labmath-1.0.7.tar.gz", "has_sig": false, "md5_digest": "749f13faa8779b5597607aedad30886b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64937, "upload_time": "2018-03-01T22:37:57", "url": "https://files.pythonhosted.org/packages/fa/d5/c22a3c4efdcf36c03f5e299ed6b9b1272d63fbb486849be7b607b2b9fe05/labmath-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "7343347dafc2d6f28e7b7e9d637e2ea0", "sha256": "f4bf6b2b2bb9cd274a8a7b4917b3e3f6ad271ff71ec6cd40cb411e4ff8c8a097" }, "downloads": -1, "filename": "labmath-1.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "7343347dafc2d6f28e7b7e9d637e2ea0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 66476, "upload_time": "2018-03-29T01:16:35", "url": "https://files.pythonhosted.org/packages/cd/87/65405f2d2bfe8dd65a221abd69803dab80e228084840769251680382c31d/labmath-1.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a88cd0fc2b8933e718819b69a3991144", "sha256": "2564ad2929d4898a7f93f0687a53f7e4c41009423a2545b26c429e662dacc862" }, "downloads": -1, "filename": "labmath-1.0.8.tar.gz", "has_sig": false, "md5_digest": "a88cd0fc2b8933e718819b69a3991144", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 66097, "upload_time": "2018-03-29T01:16:36", "url": "https://files.pythonhosted.org/packages/9d/a1/652625c17238831fb0a0de1507f293825bcae1e148a0d2834e8bbcdc0e09/labmath-1.0.8.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "de2c567f7d2e52a5952f2d0349ebd887", "sha256": "8488c6fcf799936c07428ee5702f416558f8c8b38fc1bfee6ca8f014476e007a" }, "downloads": -1, "filename": "labmath-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "de2c567f7d2e52a5952f2d0349ebd887", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 69883, "upload_time": "2018-04-28T02:34:58", "url": "https://files.pythonhosted.org/packages/4b/e1/30a305fdc97b5773d29f38868a1ec8f2a394ed34a21e87a64702a5b79831/labmath-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8c7be185dfab9cc84d4cd984aa2c89b0", "sha256": "5b48bcd7a20dd7c80349fb5562de1039c5bee17a48e9a5fc2a2a3b88992c0b68" }, "downloads": -1, "filename": "labmath-1.1.0.tar.gz", "has_sig": false, "md5_digest": "8c7be185dfab9cc84d4cd984aa2c89b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 69716, "upload_time": "2018-04-28T02:35:00", "url": "https://files.pythonhosted.org/packages/86/32/a8602105cbc82e8ff6e36b681bb76aac2be19d6de7197e8f4dd77ab04cf6/labmath-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "0df08d238a631400b2eb10d93c389c0e", "sha256": "8447d624dc72e9a3f1ef972edcd658eae9194d0fe330d23e0e5de43c68a3592e" }, "downloads": -1, "filename": "labmath-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0df08d238a631400b2eb10d93c389c0e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 77219, "upload_time": "2018-11-18T21:23:30", "url": "https://files.pythonhosted.org/packages/60/84/f7370af57b855c23c22475e2fefb1de9007892a77465a05efe0034e4a606/labmath-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9a98d31b4a109998fe340c0a0f9ef44", "sha256": "fdf67ad6d27a3d566cb9baf739795b83f571cb22a29b3dfab8f57eaf7de4803d" }, "downloads": -1, "filename": "labmath-1.2.0.tar.gz", "has_sig": false, "md5_digest": "a9a98d31b4a109998fe340c0a0f9ef44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77159, "upload_time": "2018-11-18T21:23:32", "url": "https://files.pythonhosted.org/packages/3d/ce/11a92988f04d645b82cf1789334149d7532ed263f78fbfb41dc37e85bf25/labmath-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0df08d238a631400b2eb10d93c389c0e", "sha256": "8447d624dc72e9a3f1ef972edcd658eae9194d0fe330d23e0e5de43c68a3592e" }, "downloads": -1, "filename": "labmath-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0df08d238a631400b2eb10d93c389c0e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 77219, "upload_time": "2018-11-18T21:23:30", "url": "https://files.pythonhosted.org/packages/60/84/f7370af57b855c23c22475e2fefb1de9007892a77465a05efe0034e4a606/labmath-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9a98d31b4a109998fe340c0a0f9ef44", "sha256": "fdf67ad6d27a3d566cb9baf739795b83f571cb22a29b3dfab8f57eaf7de4803d" }, "downloads": -1, "filename": "labmath-1.2.0.tar.gz", "has_sig": false, "md5_digest": "a9a98d31b4a109998fe340c0a0f9ef44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77159, "upload_time": "2018-11-18T21:23:32", "url": "https://files.pythonhosted.org/packages/3d/ce/11a92988f04d645b82cf1789334149d7532ed263f78fbfb41dc37e85bf25/labmath-1.2.0.tar.gz" } ] }