#12845: Incorrect doctest in sage/misc/functional.py
------------------------------------+---------------------------------------
Reporter: mjo | Owner: burcin
Type: defect | Status: positive_review
Priority: major | Milestone: sage-5.1
Component: symbolics | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Karl-Dieter Crisman
Authors: Michael Orlitzky | Merged in:
Dependencies: | Stopgaps:
------------------------------------+---------------------------------------
Changes (by kcrisman):
* status: needs_review => positive_review
* reviewer: => Karl-Dieter Crisman
Old description:
> We currently have,
>
> {{{
> sage: a, b, c = var("a, b, c")
> sage: v = vector([a, b, c])
> sage: bool(norm(v).simplify_full() == sqrt(a^2 + b^2 + c^2))
> True
> }}}
>
> which is true enough if a,b,c are real. The current doctest "works"
> because somewhere along the line, `simplify_full()` assumes that they're
> real. So in effect, this doctest is confirming incorrect behavior.
>
> The proper fix is to explicitly assume that a,b,c are real.
New description:
We currently have,
{{{
sage: a, b, c = var("a, b, c")
sage: v = vector([a, b, c])
sage: bool(norm(v).simplify_full() == sqrt(a^2 + b^2 + c^2))
True
}}}
which is true enough if a,b,c are real. The current doctest "works"
because somewhere along the line, `simplify_full()` assumes that they're
real. So in effect, this doctest is confirming incorrect behavior.
The proper fix is to explicitly assume that a,b,c are real.
----
Apply [attachment:sage-trac_12845.patch] and
[attachment:trac_12845-reviewer.patch].
--
Comment:
Apply sage-trac_12845.patch and trac_12845-reviewer.patch.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12845#comment:6>
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.