#11725: Generate random elements of the algebraic field
--------------------------------------------------------------------------------------------------+
Reporter: rbeezer
| Owner: AlexGhitza
Type: enhancement
| Status: needs_work
Priority: minor
| Milestone: sage-4.7.2
Component: algebra
| Keywords: random, QQbar, sd32
Work_issues: Fix doctest error; optionally also the Sphinx warnings introduced
by someone else. | Upstream: N/A
Reviewer: Simon Spicer
| Author: Rob Beezer
Merged:
| Dependencies:
--------------------------------------------------------------------------------------------------+
Changes (by leif):
* status: positive_review => needs_work
* work_issues: => Fix doctest error; optionally also the Sphinx warnings
introduced by someone else.
Comment:
This is easily fixed:
{{{
sage -t -long -force_lib
"devel/sage/sage/rings/polynomial/multi_polynomial_element.py"
**********************************************************************
File
".../sage-4.7.2.alpha3-pre2/devel/sage/sage/rings/polynomial/multi_polynomial_element.py",
line 101:
sage: x + QQbar.random_element() # indirect doctest
Expected:
x - 2
Got:
x + 4
**********************************************************************
1 items had failures:
1 of 5 in __main__.example_2
***Test Failed*** 1 failures.
}}}
[[BR]]
I also get two Sphinx warnings for `qqbar.py`; as far as I can see
(regarding the line numbers) these originate ''from another patch'':
{{{
.../sage-4.7.2.alpha3-pre2/local/lib/python2.6/site-
packages/sage/rings/qqbar.py:docstring of sage.rings.qqbar:476:
(WARNING/2) Literal block expected; none found.
.../sage-4.7.2.alpha3-pre2/local/lib/python2.6/site-
packages/sage/rings/qqbar.py:docstring of
sage.rings.qqbar.AlgebraicReal:5: (WARNING/2) Literal block expected; none
found.
}}}
Would be nice if ''you'' could fix these ''here'' as well though; my
"patch queue" for `qqbar.py` is:
{{{
changeset: 16112:799c68fc8e9b
user: Rob Beezer <[email protected]>
date: Tue Aug 23 16:49:09 2011 -0700
summary: 11725: random elements of QQbar
changeset: 16084:2d91134795c5
user: Simon King <[email protected]>
date: Tue Apr 19 10:12:21 2011 +0200
summary: #9138: Use the category framework for rings.
changeset: 16075:9baeb151c9a7
user: William Stein <[email protected]>
date: Tue Aug 23 21:36:19 2011 -0700
summary: trac 10981 -- buggy arithmetic in AA, and other issues
...
[from previous Sage releases]
}}}
So apparently one of the two others (#10981, #9138) causes them, but you
could (or should) base your patch(es) on these anyway.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11725#comment:8>
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.