Re: Issue 2607 in sympy: as_numer_denom() is too slow

2011-08-04 Thread sympy
Comment #13 on issue 2607 by asmeurer: as_numer_denom() is too slow http://code.google.com/p/sympy/issues/detail?id=2607 So this is not working so well. The problem is that the algorithm relies on *= type multiplication being fast, but currently it is not: In [1]: n = numbered_symbols()

Re: Issue 2607 in sympy: as_numer_denom() is too slow

2011-08-04 Thread sympy
Comment #14 on issue 2607 by asmeurer: as_numer_denom() is too slow http://code.google.com/p/sympy/issues/detail?id=2607 Another way would be to not distribute the denominator in each step, so compute (a1*d2 + a2*d1)/(d1*d2) ((a1*d2 + a2*d1)*d3 + a3*d1*d2)/(d1*d2*d3) (((a1*d2 + a2*d1)*d3

Re: Issue 2607 in sympy: as_numer_denom() is too slow

2011-08-04 Thread sympy
Comment #15 on issue 2607 by asmeurer: as_numer_denom() is too slow http://code.google.com/p/sympy/issues/detail?id=2607 Here's what I've got so far: def as_numer_denom(self): return self.as_numer_denom_orig() def as_numer_denom_orig(self): numers, denoms = [],[] for n,d in

Re: Issue 2607 in sympy: as_numer_denom() is too slow

2011-08-04 Thread sympy
Comment #16 on issue 2607 by asmeurer: as_numer_denom() is too slow http://code.google.com/p/sympy/issues/detail?id=2607 By the way, if anyone wants to play around with these, I've pushed them up to https://github.com/asmeurer/sympy/tree/as_numer_denom. -- You received this message because

Issue 2624 in sympy: Sympy 0.7.1 can't integrate Gaussians

2011-08-04 Thread sympy
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 2624 by alex.ebe...@gmail.com: Sympy 0.7.1 can't integrate Gaussians http://code.google.com/p/sympy/issues/detail?id=2624 Integration of a basic Gaussian works: In [9]: integrate(exp(-x**2), (x,-oo,+oo)) Out[9]: ⎽⎽⎽ ╲╱

Re: Issue 2624 in sympy: Sympy 0.7.1 can't integrate Gaussians

2011-08-04 Thread sympy
Updates: Status: Started Owner: ness...@googlemail.com Labels: Integration Comment #1 on issue 2624 by matt...@gmail.com: Sympy 0.7.1 can't integrate Gaussians http://code.google.com/p/sympy/issues/detail?id=2624 This works in one of our development branches

Re: Issue 2618 in sympy: Solve fails on expressions containing finite symbols

2011-08-04 Thread sympy
Comment #5 on issue 2618 by mrock...@gmail.com: Solve fails on expressions containing finite symbols http://code.google.com/p/sympy/issues/detail?id=2618 Ok, so apparently is_finite is operating correctly, given the definition that finite = bounded and not infinitesimal (whether or not

Re: Issue 2618 in sympy: Solve fails on expressions containing finite symbols

2011-08-04 Thread sympy
Comment #6 on issue 2618 by mrock...@gmail.com: Solve fails on expressions containing finite symbols http://code.google.com/p/sympy/issues/detail?id=2618 This commit is option #1 It works at least for the example above

Re: Issue 2618 in sympy: Solve fails on expressions containing finite symbols

2011-08-04 Thread sympy
Comment #7 on issue 2618 by nicolas@gmail.com: Solve fails on expressions containing finite symbols http://code.google.com/p/sympy/issues/detail?id=2618 If y = Symbol('y', bounded=True), then ask(Q.bounded(y)) should return True indeed. The problem is that the old assumption system

Re: Issue 2618 in sympy: Solve fails on expressions containing finite symbols

2011-08-04 Thread sympy
Comment #8 on issue 2618 by nicolas@gmail.com: Solve fails on expressions containing finite symbols http://code.google.com/p/sympy/issues/detail?id=2618 Ok, so apparently is_finite is operating correctly, given the definition that finite = bounded and not infinitesimal (whether or not

Re: Issue 2618 in sympy: Solve fails on expressions containing finite symbols

2011-08-04 Thread sympy
Comment #9 on issue 2618 by nicolas@gmail.com: Solve fails on expressions containing finite symbols http://code.google.com/p/sympy/issues/detail?id=2618 A temporary workaround might be to make check_assumptions() first check old assumptions, then new ones, so that global assumptions

Re: Issue 2618 in sympy: Solve fails on expressions containing finite symbols

2011-08-04 Thread sympy
Updates: Labels: W Comment #10 on issue 2618 by asmeurer: Solve fails on expressions containing finite symbols http://code.google.com/p/sympy/issues/detail?id=2618 If ask(Q.is_bounded(y)) returns False, then I'd say it's a wrong result. It should either know about the old

Re: Issue 2618 in sympy: Solve fails on expressions containing finite symbols

2011-08-04 Thread sympy
Updates: Labels: -W WrongResult Comment #11 on issue 2618 by asmeurer: Solve fails on expressions containing finite symbols http://code.google.com/p/sympy/issues/detail?id=2618 (No comment was entered for this change.) -- You received this message because you are subscribed to the

Re: Issue 2624 in sympy: Sympy 0.7.1 can't integrate Gaussians

2011-08-04 Thread sympy
Comment #2 on issue 2624 by asmeurer: Sympy 0.7.1 can't integrate Gaussians http://code.google.com/p/sympy/issues/detail?id=2624 Yes, Tom is working with Matthew to make sure that all the common integrals from statistics work. This will likely be in the next release, unless someone wants to

Re: Issue 2624 in sympy: Sympy 0.7.1 can't integrate Gaussians

2011-08-04 Thread sympy
Comment #3 on issue 2624 by asmeurer: Sympy 0.7.1 can't integrate Gaussians http://code.google.com/p/sympy/issues/detail?id=2624 And another issue of poor simplification: In [2]: integrate(exp(-x**2 + 2*x - 1), (x, -oo, oo)) Out[2]: ⎽⎽⎽ ⎽⎽⎽ ╲╱ π ⋅(-erf(1) + 1) ╲╱ π

Issue 2625 in sympy: Imaginary unit in R, ordering of complex numbers

2011-08-04 Thread sympy
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 2625 by arthur.n...@gmail.com: Imaginary unit in R, ordering of complex numbers http://code.google.com/p/sympy/issues/detail?id=2625 Sorry if this has already been reported; I searched open issues but didn't see this

Re: Issue 2625 in sympy: Imaginary unit in R, ordering of complex numbers

2011-08-04 Thread sympy
Updates: Status: Accepted Labels: WrongResult Assumptions Comment #1 on issue 2625 by asmeurer: Imaginary unit in R, ordering of complex numbers http://code.google.com/p/sympy/issues/detail?id=2625 This is because we have in the class Infinity: def __le__(a, b):

Re: Issue 2625 in sympy: Imaginary unit in R, ordering of complex numbers

2011-08-04 Thread sympy
Comment #2 on issue 2625 by asmeurer: Imaginary unit in R, ordering of complex numbers http://code.google.com/p/sympy/issues/detail?id=2625 I suppose there is a natural ordering of the purely imaginary numbers but statements such as '5*I 6*I' and 'I*4 I' do not return Boolean values.

Re: Issue 2607 in sympy: as_numer_denom() is too slow

2011-08-04 Thread sympy
Comment #17 on issue 2607 by smi...@gmail.com: as_numer_denom() is too slow http://code.google.com/p/sympy/issues/detail?id=2607 I see two simple limiting cases: all denoms the same and all denoms having the same base raised to different powers. Your code 3 handles the latter well and only one

Re: Issue 2607 in sympy: as_numer_denom() is too slow

2011-08-04 Thread sympy
Comment #18 on issue 2607 by asmeurer: as_numer_denom() is too slow http://code.google.com/p/sympy/issues/detail?id=2607 There is a fifth method, which is to cancel stuff, as discussed in comments 4 and 5. I've pushed that as as_numer_denom5() in my branch. For the example expressions

Re: Issue 2607 in sympy: as_numer_denom() is too slow

2011-08-04 Thread sympy
Comment #19 on issue 2607 by asmeurer: as_numer_denom() is too slow http://code.google.com/p/sympy/issues/detail?id=2607 Sorry, that's as_numer_denom4(). And here are some timings: In [12]: numers, denoms = zip(*((Symbol('n%d'%i),Symbol('d%d'%i)) for i in xrange(1000))) In [13]: a =