sympy/sympy — pull request #2268 by jrioux (2013-07-10 21:57:46+00:00)
Title: Order term handling, Order at infinity, limits with Order

- Implement expension point for Order() at Infinity. …

The current definition of Order(), which always represents the big-O notation as the variables tend to Zero, is extended to allow variables to tend to either Zero or Infinity.

```
>>> O(x)
O(x)
>>> O(1/x, oo)
O(1/x, x -> oo)
```

Fixes issue 234: Order needs zero point information, for eg making subs to work correctly
http://code.google.com/p/sympy/issues/detail?id=234

- Addition of Order is made a commutative operation. …

Previously:

```
>>> O(1, a, b) + O(1)
O(1, a, b)
>>> O(1) + O(1, a, b)
O(1)
>>> O(1, a, b) + O(a + b, a, b)
O(1, a, b)
>>> O(a + b, a, b) + O(1, a, b)
O(a + b, a, b)
```

Now:

```
>>> O(1, a, b) + O(1)
O(1, a, b)
>>> O(1) + O(1, a, b)
O(1, a, b)
>>> O(1, a, b) + O(a + b, a, b)
O(1, a, b)
>>> O(a + b, a, b) + O(1, a, b)
O(1, a, b)
```

Fixes issue 1180: Strange behaviour of O notation
http://code.google.com/p/sympy/issues/detail?id=1180

- Handle Order inside limits at infinity. …

Fixes issue 2670: Problems with limit with order terms
http://code.google.com/p/sympy/issues/detail?id=2670

- Remove @XFAIL on passing tests.

TODO: Add tests