#12809: Solve does not give consistent results when a dummy variable is involved
---------------------------------+------------------------------------------
Reporter: afleckenstein | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-5.0
Component: symbolics | Resolution:
Keywords: solve | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by was):
Replying to [comment:1 kcrisman]:
> This is a known issue - I won't call it a problem, though some people
(like the reporter) certainly have strong feelings on this. People have
tried to weasel out of it in changing doctests by putting ellipses in for
the variable names, but in the end it's better to show the end user
reading the documentation what a likely output actually looks like.
I completely disagree with you. I think it is perfectly reasonable to
replace an example like
{{{
sage: solve([cos(x)*sin(x) == 1/2, x+y == 0],x,y)
[[x == 1/4*pi + pi*z94, y == -1/4*pi - pi*z94]]
}}}
with
{{{
sage: solve([cos(x)*sin(x) == 1/2, x+y == 0],x,y)
[[x == 1/4*pi + pi*z..., y == -1/4*pi - pi*z...]]
}}}
Alternatively, if this is NOT intended for somebody to actually read, then
simply make it a "unit test", e.g., put all the tests into a function
(e.g., "test_solve"), then do whatever you want to verify correctness of
output using asserts, and finally put one single doctest in test_solve,
which is:
{{{
sage: test_solve()
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12809#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.