Hello,

It looks like this is happening since the __contains__ for
RealIntervalField isn't working properly.  See below:

ipdb> x
[3.9999999562 .. 4.0000000466]
ipdb> x.parent()
Real Interval Field with 32 bits of precision
ipdb> self.base_ring()
Real Interval Field with 32 bits of precision
ipdb> x in self.base_ring()
False
ipdb> x in x.parent()
False

--Mike
On Mon, Jul 7, 2008 at 9:19 PM, saucerful <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have boiled it down to:
>
> R = RealIntervalField(32);
> A.<i,j,k>=QuaternionAlgebra(R,-1,-1)
> print A(1)/(j + 2);
>
> Executing this code results in an error whose traceback is pasted at
> the end of this message.  Note that by hand (or by using RealField
> instead of RealIntervalField) this computation gives .4 - .2j
>
> Traceback (click to the left for traceback)
> ...
> TypeError: Argument x (= [3.9999999562 .. 4.0000000466]) is of the
> wrong
> type.
>
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/home/eric/.sage/sage_notebook/worksheets/admin/15/code/
> 18.py", line 8, in <module>
>    print A(Integer(1))/(j + Integer(2));
>  File "/opt/sage/local/lib/python2.5/site-packages/sympy/plotting/",
> line 1, in <module>
>
>  File "element.pyx", line 1480, in
> sage.structure.element.RingElement.__div__ (sage/structure/element.c:
> 9056)
>  File "coerce.pxi", line 136, in sage.structure.element._div_c (sage/
> structure/element.c:16160)
>  File "/opt/sage/local/lib/python2.5/site-packages/sage/algebras/
> quaternion_algebra_element.py", line 246, in _div_
>    if other.is_unit() == False:
>  File "/opt/sage/local/lib/python2.5/site-packages/sage/algebras/
> quaternion_algebra_element.py", line 152, in is_unit
>    if self.reduced_norm() == 0:
>  File "/opt/sage/local/lib/python2.5/site-packages/sage/algebras/
> quaternion_algebra_element.py", line 86, in reduced_norm
>    x = self * self.conjugate()
>  File "/opt/sage/local/lib/python2.5/site-packages/sage/algebras/
> quaternion_algebra_element.py", line 49, in conjugate
>    return self.parent()(self.reduced_trace()) - self
>  File "/opt/sage/local/lib/python2.5/site-packages/sage/algebras/
> quaternion_algebra.py", line 386, in __call__
>    return QuaternionAlgebraElement(self,x)
>  File "/opt/sage/local/lib/python2.5/site-packages/sage/algebras/
> quaternion_algebra_element.py", line 34, in __init__
>    FreeAlgebraQuotientElement.__init__(self, H, x)
>  File "/opt/sage/local/lib/python2.5/site-packages/sage/algebras/
> free_algebra_quotient_element.py", line 97, in __init__
>    raise TypeError, "Argument x (= %s) is of the wrong type."%x
> TypeError: Argument x (= [3.9999999562 .. 4.0000000466]) is of the
> wrong type.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to