#19152: {Real,Complex}Ball: Miscellaneous fixes and improvements
-------------------------------------+-------------------------------------
Reporter: mmezzarobba | Owner:
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-6.10
Component: numerical | Resolution:
Keywords: | Merged in:
Authors: Marc Mezzarobba | Reviewers: Clemens Heuberger
Report Upstream: N/A | Work issues:
Branch: public/19152-arb- | Commit:
misc | 0a04e627728c37d334c3576eb5243facebee0e80
Dependencies: #19063 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by mmezzarobba):
Replying to [comment:63 jdemeyer]:
> Replying to [comment:62 mmezzarobba]:
> > it causes doctest failures that I didn't have the time or motivation
to investigate...
>
> Can you at least push your attempt such that it can be investigated?
The following change:
{{{
diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py
index b5d4db7..33f18a1 100644
--- a/src/sage/rings/all.py
+++ b/src/sage/rings/all.py
@@ -83,7 +83,8 @@ from real_double import RealDoubleField, RDF,
RealDoubleElement
from real_lazy import RealLazyField, RLF, ComplexLazyField, CLF
-from sage.rings.real_arb import RealBallField, RBF
+lazy_import("sage.rings.real_arb", "RealBallField")
+lazy_import("sage.rings.real_arb", "RBF")
# Polynomial Rings and Polynomial Quotient Rings
from polynomial.all import *
}}}
leads to:
{{{
$ ./sage -t src/sage/rings/real_arb.pyx src/sage/rings/complex_arb.pyx
too many failed tests, not using stored timings
Running doctests with ID 2015-11-16-16-34-41-63268156.
Git branch: arb-misc
Using --optional=mpir,python2,sage,scons
Doctesting 2 files.
sage -t src/sage/rings/real_arb.pyx
**********************************************************************
File "src/sage/rings/real_arb.pyx", line 314, in
sage.rings.real_arb.RealBallField
Failed example:
(1/2*RBF(1)) + AA(sqrt(2)) - 1 + polygen(QQ, x)
Exception raised:
Traceback (most recent call last):
File "/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 496, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 858, in compile_and_execute
exec(compiled, globs)
File "<doctest sage.rings.real_arb.RealBallField[2]>", line 1, in
<module>
(Integer(1)/Integer(2)*RBF(Integer(1))) + AA(sqrt(Integer(2))) -
Integer(1) + polygen(QQ, x)
File "sage/structure/element.pyx", line 1702, in
sage.structure.element.RingElement.__add__
(build/cythonized/sage/structure/element.c:16575)
return coercion_model.bin_op(left, right, add)
File "sage/structure/coerce.pyx", line 1070, in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(build/cythonized/sage/structure/coerce.c:9739)
raise TypeError(arith_error_message(x,y,op))
TypeError: unsupported operand parent(s) for '+': 'Real ball field
with 53 bits precision' and 'Univariate Polynomial Ring in x over Rational
Field'
**********************************************************************
1 item had failures:
1 of 14 in sage.rings.real_arb.RealBallField
[454 tests, 1 failure, 0.23 s]
sage -t src/sage/rings/complex_arb.pyx
[253 tests, 0.25 s]
----------------------------------------------------------------------
sage -t src/sage/rings/real_arb.pyx # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 0.7 seconds
cpu time: 0.5 seconds
cumulative wall time: 0.5 seconds
(exit 1)
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/19152#comment:64>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.