On Wed, Jul 3, 2013 at 5:11 PM, Aaron Meurer <[email protected]> wrote: > On Wed, Jul 3, 2013 at 5:40 PM, Ronan Lamy <[email protected]> wrote: >> 2013/7/3 Ondřej Čertík <[email protected]> >>> >>> On Wed, Jul 3, 2013 at 1:48 PM, Aaron Meurer <[email protected]> wrote: >>> >>> Why wouldn't simple type based dispatch work? >>> You might be right, I just want to understand the problem more. >>> >>> To answer Aaron's question: >>> >>> On Wed, Jul 3, 2013 at 12:58 PM, Aaron Meurer <[email protected]> wrote: >>> > So, going back to what we discussed the first time we met in Los >>> > Alamos, how would you reimplement something like the oo logic so that >>> > it lives entirely in the Infinity class, not in Add.flatten (say for >>> > simplicity, oo + 3 should go to oo, but oo + 3*I should remain as oo + >>> > 3*I)? >>> >>> This, and another example is x + O(x). Let's stick to oo + 3. >> >> >> x + O(x) is a bad example, because it should really not be represented by an >> Add. >> >>> This is a very good question and it is one of the details that I don't >>> know the answer 100% yet. >>> But I feel it is solvable. >>> >>> I think the best would be to create a demo (from scratch) where we can >>> play with these ideas. Hopefully I'll get to this eventually. >> >> >> How about this: https://github.com/rlamy/sympy/commits/binop ? > > It's tough to mull through a list of commits
See my previous email to easily see the changes. >, so let me just ask you > some questions about it (I know you posted this branch a while ago, > but I forgot the details). > > - Does it handle nary operations or just binary? It only handles Pow. > > - What about *args like Mul.flatten? Pow doesn't have it, so nothing is implemented in this regard. > > - If two types register dispatchers against one another, what are the > precedence rules? If I understand the code correctly, it raises an exception if two possibilities exist. Which is the sane thing to do imho. > > Aaron Meurer > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sympy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/sympy. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
