Comment #75 on issue 1694 by nicolas.pourcelot: solve has many issues with fractions
http://code.google.com/p/sympy/issues/detail?id=1694

"Are you accessing the branch, Nicolas, or did you prefer a patch?"

It cost me a few tries, but I found the command. :)
    git clone -b nic http://github.com/smichr/sympy.git

You said 4) was done however, but I didn't see it: simplification still occurs in solve() instead of _solve_one_equation().

(This is important if strategy == GS_POLY for example, since we set
flags['simplified'] = flags.get('simplified', False).
If the simplification doesn't occur in _solve_one_equation(), flags change will be lost).

A few new comments also:

5) If you move solution simplification in _solve_one_equation(), you can remove it here:
        if len(symbols) != 1:
            result = {}
            for s in symbols:
                result[s] = _solve_one_equation(f, s, **flags)
            if flags.get('simplified', True):
                for s, r in result.items():
                    result[s] = map(simplify, r)
            return result

will become:

        if len(symbols) != 1:
            result = {}
            for s in symbols:
                result[s] = _solve_one_equation(f, s, **flags)
            return result

6) I didn't notice first, but there is some drawback to use the same flag ('simplified') for checkout() and solve(). If simplified=True, checkout() will not simplify solution, so solution simplification should always happen *before* calling checkout().

(This will only happen with this particular combination of flags: numerical_check=False and simplified=True)



7) Maybe you should put a short comment here, to explain that num/denom decomposition only occurs on first path ?

    if flags.get('_solve_one_first', True):
        flags['_solve_one_first'] = False
        f, d = f.as_numer_denom()
    else:
        d = S.One


--
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.

Reply via email to