These are chat archives for symengine/symengine

5th
Jun 2014
Ondřej Čertík
@certik
Jun 05 2014 19:44
hi @sushant-hiray
Sushant Hiray
@sushant-hiray
Jun 05 2014 19:44
hi!
So I figured I would use up this week to fix this issue from the root. Anyway we are running ahead of the proposal schedule so shouldn't be much of an issue
It is quite important this bug gets fixed correctly
Ondřej Čertík
@certik
Jun 05 2014 19:48
yes, and I really appreciate you doing it
even if it takes longer, this issue really needs to be fixed properly
I am still not sure what the best way is.
Sushant Hiray
@sushant-hiray
Jun 05 2014 19:49
I guess everyone have chosen a certain guideline and followed as can be seen with the way Mathematica deals with it
Ondřej Čertík
@certik
Jun 05 2014 19:50
perhaps let's look at replacing 3/4 by z
so we get: z^x and (1/z)^x
how is that handled?
and how about (a/b)^x * (b/a)^y
Part of the confusion is that 3/4 is actually a single type Rational (for efficiency reasons), so it complicates things.
I need to go, but I'll be back later. The general guidelines are that it needs to be fast, i.e. whatever we do, it should not (measurably) slow things down.
Sushant Hiray
@sushant-hiray
Jun 05 2014 19:55
Yes, ofcourse! For now, I'll just try to look into the `mul` dict and make sure we follow a singular guideline everywhere. Once we finally decide the way to go about it, we can update it!
Ondřej Čertík
@certik
Jun 05 2014 19:55
I like the numerator always greater than denumerator approach.
It avoids the find, and it should be robust and it should fix the issue. Once that is in, we can possibly improve upon it, if we really want to somehow handle numerator < denumerator for some reason.
Sushant Hiray
@sushant-hiray
Jun 05 2014 19:56
yeah that way we avoid an extra for cases like `2` and `1/2`
Ondřej Čertík
@certik
Jun 05 2014 19:56
So (3/4)^x will get converted to (4/3)^(-x), but I think that's fine. These rational numbers aren't used that often (with symbolic powers) I think.
Sushant Hiray
@sushant-hiray
Jun 05 2014 19:58
I guess, once we have the basic fix then perhaps we can discuss this issue in the mailing list to see if anyone has any further ideas regarding it
Ondřej Čertík
@certik
Jun 05 2014 20:00
That's right. This is also similar to whether 2^x 2^y should always get combined to 2^(x+y). The same for a^x a^y -> a^(x+y).
Are we currently combining the powers?
Sushant Hiray
@sushant-hiray
Jun 05 2014 20:01
yes
Ondřej Čertík
@certik
Jun 05 2014 20:02
Yes, then we should just combine everything, so that it's consistent.
Have to go, be back in an hour or so
Sushant Hiray
@sushant-hiray
Jun 05 2014 20:03
sure