Updates:
Cc: asmeurer Vinzent.Steinberg
Comment #9 on issue 1736 by smichr: Refactor pattern matching and
substitution
http://code.google.com/p/sympy/issues/detail?id=1736
I think we really need to get some way to doing things in a system
independent way. Today I just got bit by a 32-bit/64-bit difference in
pattern matching:
on 32-bit:
eq=1/(2+sqrt(2))
n,d=eq.as_numer_denom()
d
2 + 2**(1/2)
wa, wb, wc, wp = map(Wild, 'abcp')
r = d.match(wa + wb*wc**wp)
r
{c_: 2, a_: 2, b_: 1, p_: 1/2}
but that last line on 64-bit is:
{c_: 2, a_: 2**(1/2), b_: 1, p_: 1}
Pattern matching should try match the more complicated (more restrictive)
terms first. But if there is a tie, that's where we need a
system-independent something--custom sort?
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.