#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 tmonteil):
* cc: tmonteil (added)
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)()
> }}}
>
> 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'
> }}}
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'
}}}
This problem was also encoutered [http://ask.sagemath.org/question/10115
/problem-with-conjugate_transpose-of-a-symbolic-matrix/?answer=14912#post-
id-14912 on this ask thread].
--
Comment:
Are you working on this ?
Is a solution involving the use of the (already defined) `.exp()` method
acceptable on the short term (it may not lead to the thinest possible
intervals), or do you think about some more accurate way of writing those
?
--
Ticket URL: <http://trac.sagemath.org/ticket/17285#comment:2>
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.