#17285: CIF is missing many functions
------------------------------------+------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #17130 | Stopgaps:
------------------------------------+------------------------
Changes (by jdemeyer):
* component: symbolics => basic arithmetic
Old description:
> {{{
> sage: CIF(cos(3/2))
> ---------------------------------------------------------------------------
> TypeError Traceback (most recent call
> last)
> <ipython-input-31-4eae9038f0b3> in <module>()
> ----> 1 CIF(cos(Integer(3)/Integer(2)))
>
> /usr/local/src/sage-config/local/lib/python2.7/site-
> packages/sage/rings/complex_interval_field.pyc in __call__(self, x, im)
> 378
> 379 try:
> --> 380 return x._complex_mpfi_( self )
> 381 except AttributeError:
> 382 pass
>
> /usr/local/src/sage-config/local/lib/python2.7/site-
> packages/sage/symbolic/expression.so in
> sage.symbolic.expression.Expression._complex_mpfi_
> (build/cythonized/sage/symbolic/expression.cpp:8043)()
> }}}
>
> Similar things do work:
> {{{
> sage: RIF(cos(3/2))
> 0.0707372016677030?
> sage: CC(cos(3/2))
> 0.0707372016677029
> sage: CIF(cos(3))
> -0.98999249660044542?
> }}}
New description:
{{{
sage: CIF(cos(3/2))
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
<ipython-input-31-4eae9038f0b3> in <module>()
----> 1 CIF(cos(Integer(3)/Integer(2)))
/usr/local/src/sage-config/local/lib/python2.7/site-
packages/sage/rings/complex_interval_field.pyc in __call__(self, x, im)
378
379 try:
--> 380 return x._complex_mpfi_( self )
381 except AttributeError:
382 pass
/usr/local/src/sage-config/local/lib/python2.7/site-
packages/sage/symbolic/expression.so in
sage.symbolic.expression.Expression._complex_mpfi_
(build/cythonized/sage/symbolic/expression.cpp:8043)()
}}}
The reason that this fails is:
{{{
sage: CIF(3/2).cos()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-13-96dae572cb36> in <module>()
----> 1 CIF(Integer(3)/Integer(2)).cos()
/usr/local/src/sage-config/local/lib/python2.7/site-
packages/sage/structure/element.so in
sage.structure.element.Element.__getattr__
(build/cythonized/sage/structure/element.c:4068)()
/usr/local/src/sage-config/local/lib/python2.7/site-
packages/sage/structure/misc.so in
sage.structure.misc.getattr_from_other_class
(build/cythonized/sage/structure/misc.c:1631)()
AttributeError: 'sage.rings.complex_interval.ComplexIntervalFieldElement'
object has no attribute 'cos'
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/17285#comment:1>
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.