{"shas":[["e14c276cb347e4e00b492659c0a5328ff55cf26c","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","prefilter operations args for cls.identity\n\n    When an existing Mul is multiplied by 1, all the arguments of the existing\n    Mul are unecessarily re-traversed in building up the answer. Now, that\n    trivial operation is avoided by filtering out the cls.idenity (1 for Mul\n    and 0 for Add).\n\n    pre = 'from sympy import Dummy, Mul\\nm=Mul(*[Dummy() for i in xrange(500000)])'\n    >>> T('2*m', pre, number=1)\n    7.073108072289841\n    >>> T('1*m', pre, number=1)\n    0.020833237205948762\n\n    pre = 'from sympy import Dummy, Mul\\nm=Mul(*[Dummy() for i in xrange(5)])'\n    >>> T('2*m', pre, number=1)\n    0.00031683582523100995\n    >>> T('1*m', pre, number=1)\n    0.0001092006970395687\n\n    This has the added benefit of not having to pre-filter\n    identity terms in the library code if one wants to return a valid\n    evaluate=False expression for Add and Mul. Note: this also has the side\n    effect that an unevaluated Mul can no longer be 'touched' with 1 to\n    re-evaluated the Mul. One would have to explicitly do something like\n    new_mul = Mul(*old_mul.args). Also note that Mul(*args, evaluate=False)\n    is not the same as using Mul's _new_rawargs method which does almost\n    nothing to the args it is given, so\n\n    >>> MUL = lambda *args: object.__new__(Mul)._new_rawargs(*args)\n    >>> MUL(S.One, x).args\n    (1, x)\n    >>> Mul(S.One, x, evaluate=False).args # now gives x with no args\n    ()\n    >>> Mul(S.One, x).args # always gave x with no args\n    ()\n\n    Note about quantum changes:\n    Tests in quantum failed because an unevaluated 1/sqrt(2) was being used.\n    These failures no longer occur after the next commit.","Chris Smith"],["90fed5a6faf9c7e6511c4c55902af1ce97bc2fdd","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","watch for unevaluated Pow in Add\n\n    As in Mul.flatten, the unevaluted numerical Pow needs to be\n    watched for since, e.g. 1/sqrt(2) should be interpreted as\n    sqrt(2)/2 and 2**3 should add in to the coefficient of the Add.\n\n    Without these changes, the use of the unevaluated 1/sqrt(2) in\n    quantum causes test failures.","Chris Smith"],["810590d520244ed6447c4246e28e3eaa334d74fd","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","add docstring to as_base_exp\n\n    base and exp (without parenthesis) are just legible shorthand\n    for args[0] and args[1]. There is no processing of the args.\n    as_base_exp() will slightly process the args so things like\n    (1/i)**e are returned as (i, -e).","Chris Smith"],["90884c439a38a65bf8f0a5fbd2bc65dd56abbb79","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","renormalize Floats a different way since 0 is filtered from Add","Chris Smith"],["63d6a265455ca8b5565b904444253ed4cba10fb9","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","fix factor_ doctest to explicitly evaluate Pow","Chris Smith"],["0f755160cc48e92f83c0f889a8b83f9a23b64177","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","AskBoundedHandler in calculus considers exp sign for x**exp\n\n    A base < 1 will only be bounded for an unbounded exponent if\n    the exponent is not negative. e.g. (1/2)**-oo = oo, unbounded.","Chris Smith"],["824918a95d304afcd44a71bc65684d6d5077462b","31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","Move Tuple import in sympify to where it is needed\n\nThis was slowing down the function, which matters for such an often\ncalled function as sympify().\n\nBefore:\n\nIn [1]: a = [1 for i in xrange(1000)]\n\nIn [2]: %timeit sympify(a)\n100 loops, best of 3: 4.6 ms per loop\n\nIn [3]: %timeit sympify(tuple(a))\n100 loops, best of 3: 7.37 ms per loop\n\nAfter:\n\nIn [1]: a = [1 for i in xrange(1000)]\n\nIn [2]: %timeit sympify(a)\n1000 loops, best of 3: 1.75 ms per loop\n\nIn [3]: %timeit sympify(tuple(a))\n100 loops, best of 3: 2.28 ms per loop","Aaron Meurer"],["11a1baa7e321aad2241261310f0d0a484d18ce2a","31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","Add some various implementations of Add.as_numer_denom for speed testing\n\nSee issue 2607.","Aaron Meurer"],["22daed8f7ec018b0f702957264925029aa10d1aa","31f32c38d376716288ed3532810268fc4a4ffcc6@gmail.com","Add an Add.as_numer_denom4() example that cancels out terms","Aaron Meurer"],["90a3d78fa133da5bd5557fd71a3a6241311a30d8","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","uneval mul and binary","Chris Smith"],["74d1f610a4d696e04d0c4847d786ac11d38d5d23","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","4b and 5","Chris Smith"],["0226fea46a81f6ea6da87aec6b8399ea4e0718e2","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","cache","Chris Smith"],["54b4d24a9775a1f95497f1bf75308c3efa7d5a49","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","wip","Chris Smith"],["09223c2cae26455ac2ce9e99e268fcd830c95d43","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","using cached values is slow","Chris Smith"],["5963fcb79616e5eabab6f700386fb814e727d454","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","try sorting in 6","Chris Smith"],["318377b7e4198a150a1b8327a9b719611291ef24","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","be more careful about sorting in 6","Chris Smith"],["08a061498872515c0930150fa7f3573fefd823e6","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","handle leading constants better\n\n>>> (x/y+x/2+3/x).as_numer_denom6()\n(x**2*y + 2*x**2 + 6*y, 2*x*y)\n>>> (x/y+x/2+3/x).as_numer_denom()\n(x**2*y + 2*x**2 + 6*y, 2*x*y)\n>>> (x/1+y/2+z/3).as_numer_denom6()\n(6*x + 3*y + 2*z, 6)\n>>> (x/1+y/2+z/3).as_numer_denom()\n(6*x + 3*y + 2*z, 6)\n>>> (x/2 + 1/(5*(x + 1))).as_numer_denom6()\n(x*(5*x + 5) + 2, 10*x + 10)\n>>> (x/2 + 1/(5*(x + 1))).as_numer_denom()\n(x*(5*x + 5) + 2, 10*x + 10)\n>>> from timeit import timeit as T\n>>> T('Add(*[1/Dummy() for i in xrange(500)]).as_numer_denom6()','from sympy imp\nort Dummy, Add', number=1)\n1.4353856028742573\n>>> T('Add(*[1/Dummy() for i in xrange(500)]).as_numer_denom4()','from sympy imp\nort Dummy, Add', number=1)\n21.225003537452913\n>>> T('Add(*[Dummy() for i in xrange(1000)]).as_numer_denom6()','from sympy impo\nrt Dummy, Add', number=1)\n0.016849042016737314\n>>> T('Add(*[Dummy()/i for i in xrange(1,1000)]).as_numer_denom6()','from sympy\nimport Dummy, Add', number=1)\n0.9006821644700267","Chris Smith"],["be6268651fdb3fad48918cc054a159f6d95e9f4a","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","fix solver test and whitespace","Chris Smith"],["ab32ad3a329d1c67828fb78d25a5cae24a94246c","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","asnd added","Chris Smith"],["1050eadf3e84b891e6dd3d4d9b19758e1de30963","b274abc493535ae88cb3a0742f63e38c9241d67c@gmail.com","nums can be more than 1","Chris Smith"]],"ref":"refs/heads/and","size":48,"head":"ca91cb5e85a29f11276be994107846bac85d285c","push_id":39854817}