Opened 8 years ago

Closed 7 years ago

#15179 closed defect (worksforme)

Function_cot.__evalf_() missing some cases

Reported by: burcin Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords:
Cc: eviatarbach Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

From this sage-support thread:

sage: u = cot(pi*x)
sage: u.is_zero()  
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<snip>
/home/burcin/sage/sage-5.11.beta3/local/lib/python2.7/site-packages/sage/functions/trig.pyc in _evalf_(self, x, parent)
    377         if parent is float:
    378             return 1/math.tan(x)
--> 379         return x.cot()
    380 
    381     def _derivative_(self, x, diff_param=None):
<snip>
AttributeError: 'sage.rings.complex_interval.ComplexIntervalFieldElement' object has no attribute 'cot'

There are many objects which end up as x in Function_cot._evalf_() that do not support .cot().

We should check if the other functions in sage/functions/trig.py handle more input types properly.

Change History (6)

comment:1 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:2 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:3 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:4 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to needs_review

worksforme:

sage: sage: u = cot(pi*x)
sage: sage: u.is_zero()  
False

comment:5 Changed 7 years ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:6 Changed 7 years ago by vbraun

  • Resolution set to worksforme
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.