Opened 6 years ago

Last modified 5 years ago

#17285 closed defect

CIF is missing many functions — at Version 2

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-6.6
Component: basic arithmetic Keywords:
Cc: tmonteil, vdelecroix Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #17130 Stopgaps:

Description (last modified by tmonteil)

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)
    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/ 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/ 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/ 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 on this ask thread.

Change History (2)

comment:1 Changed 6 years ago by jdemeyer

  • Component changed from symbolics to basic arithmetic
  • Description modified (diff)
  • Summary changed from CIF(cos(3/2)) fails to CIF is missing many functions

comment:2 Changed 6 years ago by tmonteil

  • Cc tmonteil added
  • Description modified (diff)

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 ?

Note: See TracTickets for help on using tickets.