#8497: bug in simplify_radical
-----------------------------+----------------------------------------------
Reporter: zimmerma | Owner: burcin
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.7.2
Component: calculus | Keywords: simplify, radical, sqrt
Work_issues: | Upstream: N/A
Reviewer: Burcin Erocal | Author: Paul Zimmermann, Jeroen Demeyer
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by newvalueoldvalue):
* status: positive_review => needs_work
* author: Paul Zimmermann => Paul Zimmermann, Jeroen Demeyer
Old description:
> the documentation of {{{simplify_radical}}} says:
> {{{
> sage: x.simplify_radical?
> ...
> Simplifies this symbolic expression, which can contain logs,
> exponentials, and radicals, by converting it into a form which is
> canonical over a large class of expressions and a given ordering
> of
> variables
> }}}
> however if indeed it is able to recognize zero:
> {{{
> sage: a=1/(sqrt(5)+sqrt(2))-(sqrt(5)-sqrt(2))/3
> sage: a.simplify_radical()
> 0
> }}}
> it does *not* return a canonical expression:
> {{{
> sage: a1=1/(sqrt(5)+sqrt(2))
> sage: a2=(sqrt(5)-sqrt(2))/3
> sage: a1.simplify_radical()
> 1/(sqrt(2) + sqrt(5))
> sage: a2.simplify_radical()
> -1/3*sqrt(2) + 1/3*sqrt(5)
> sage: (a1-a2).simplify_radical()
> 0
> }}}
New description:
the documentation of {{{simplify_radical}}} says:
{{{
sage: x.simplify_radical?
...
Simplifies this symbolic expression, which can contain logs,
exponentials, and radicals, by converting it into a form which is
canonical over a large class of expressions and a given ordering of
variables
}}}
however if indeed it is able to recognize zero:
{{{
sage: a=1/(sqrt(5)+sqrt(2))-(sqrt(5)-sqrt(2))/3
sage: a.simplify_radical()
0
}}}
it does *not* return a canonical expression:
{{{
sage: a1=1/(sqrt(5)+sqrt(2))
sage: a2=(sqrt(5)-sqrt(2))/3
sage: a1.simplify_radical()
1/(sqrt(2) + sqrt(5))
sage: a2.simplify_radical()
-1/3*sqrt(2) + 1/3*sqrt(5)
sage: (a1-a2).simplify_radical()
0
}}}
'''Apply''' only [attachment:8497_fix_doc.patch]
--
Comment:
Fixed some formatting of the documentation, needs review.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8497#comment:15>
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.