#6642: [with patch, needs work] problem with solve (from the tutorial)
------------------------+---------------------------------------------------
 Reporter:  jhpalmieri  |       Owner:            
     Type:  defect      |      Status:  new       
 Priority:  major       |   Milestone:  sage-4.1.2
Component:  symbolics   |    Keywords:            
 Reviewer:              |      Author:            
   Merged:              |  
------------------------+---------------------------------------------------

Comment(by jhpalmieri):

 In 4.1.2.alpha1, I'm getting something odd when I don't specify
 {{{explicit_solutions}}}:
 {{{
 sage: solve(sin(x) == cos(x), x, explicit_solutions=False)
 [sin(x) == cos(x)]
 sage: solve(sin(x) == cos(x), x, explicit_solutions=True)
 []
 sage: solve(sin(x) == cos(x), x)
 [x == r2, x == r1]
 }}}
 I think at least two changes are in order, if I understand the code right:
 first, change the default value for explicit_solutions from "None" to
 "False".  As it stands, in the "if" block that starts with the line
 {{{
 if explicit_solutions is not False:
 }}}
 the code is executed if explicit_solutions is None or True, but not if
 it's False.  I suppose this line could be changed to
 {{{
 if bool(explicit_solutions) is not False:
 }}}
 Second, several comments ("We only reach this if explicit_solutions is
 None", "This is fine because explicit_solutions is None") may need to be
 changed to reflect this.

 Of course, I could be misunderstanding everything, and we want "False",
 "True", and "None" to each behave differently.  If so, this needs to be
 documented; for example, "explicit_solutions" is not a bool in this case.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6642#comment:2>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---

Reply via email to