Am 23.03.2015 um 22:39 schrieb Aaron Meurer:
> On Mon, Mar 23, 2015 at 4:35 PM, Joachim Durchholz <
j...@durchholz.org> wrote:
>> #####2 Now this is asserting Eq(1/s,1) for old and Eq(s,1) for new. These
>> are semantically different for the case s=0 (i.e. integral of just sinh(x)):
>> Old sort order gives a fail, new sort order gives a definite result.
>> Now I'm wondering how this is accidentally improving Meijer heuristics. (Or
>> is the difference mathematically irrelevant?) And I'm wondering where a
>> changed sort order might accidentally worsen the heuristics.
>
> If s = 0 in either case Ne(s, 1) and Ne(1/s, 1) will be False,
Ah. I'd thought that Ne(1/s, 1) would be None (because 1/0 undefined).
> so I
> think in this case they are completely the same.
Then they are.
> The version with s is obviously simpler, but we shouldn't rely on the
> algorithm to give simple results, unless there are no other changes.
Is Meijer heuristic? In that case, I think variation due to changed sort
order would be expected.
Oh. I find the ordered() call in _rewrite2 isn't dependent on Basic
ordering at all,
> I would try to find some other example that this gives different
> results for,
I won't find anything by myself (not enough integral knowledge on this
side of the keyboard), but I'll take a look at the other unit test
failure related to integrals.
Or, alternatively, we could start torture testing SymPy by making Basic
use a random (but consistent-per-run) sort order, e.g. XOR
PYTHONHASHROOT into the class names before comparing them.
I'm obviously working on making SymPy's unit tests robust against this
kind of change, but I'm sceptical that this will be doable for heuristic
algorithms.
> or, preferably, get ahold of Tom Bachmann, and see if he
> can shed any insight.
I'll try to contact him.