#1163: assume seems to have some undesired side-effects
----------------------+-----------------------------------------------------
Reporter: zimmerma | Owner: gfurnish
Type: defect | Status: assigned
Priority: major | Milestone: sage-4.1.2
Component: calculus | Keywords:
Reviewer: | Author:
Merged: |
----------------------+-----------------------------------------------------
Comment(by kcrisman):
Another comment:
With Pynac symbolics, we do not (unfortunately?) simplify sqrt(x^2) even
when we assume things about it. Interestingly, that is not true for other
things, such as a neat example in the documentation.
{{{
sage: assume(x<0)
sage: sqrt(x^2)
sqrt(x^2)
sage: sqrt(x^2).simplify() # doesn't simplify this
sqrt(x^2)
sage: sqrt(x^2).simplify_full() # does what used to happen
-x
sage: assumptions()
[x < 0]
sage: forget()
sage: assume(x,'integer')
sage: sin(x*pi)
sin(pi*x)
sage: sin(x*pi).simplify() # nice simplification
0
sage: assumptions()
[x is integer]
sage: forget()
}}}
So it's good the bug was discovered when it was.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1163#comment:11>
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
-~----------~----~----~----~------~----~------~--~---