Opened 9 years ago
Closed 8 years ago
#1174 closed defect (fixed)
[with patch, with positive review] very minor bug in calculs _complex_ coercion.
Reported by: | was | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-2.8.15 |
Component: | calculus | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by robertwb)
Still broken (or perhaps something deeper)
sage: complex(cos(3)) ------------------------------------------------------------ Traceback (most recent call last): File "<ipython console>", line 1, in <module> File "/Users/robert/sage/current/local/lib/python2.5/site-packages/sage/calculus/calculus.py", line 3908, in __complex__ return complex(f._approx_(complex(g))) <type 'exceptions.TypeError'>: can't convert complex to float; use abs(z)
Attachments (3)
Change History (12)
Changed 9 years ago by was
comment:1 Changed 9 years ago by was
comment:2 Changed 9 years ago by AlexGhitza
- Summary changed from very minor bug in calculs _complex_ coercion. to [with patch] very minor bug in calculs _complex_ coercion.
comment:3 Changed 9 years ago by robertwb
I approve.
comment:4 Changed 9 years ago by robertwb
But there should be a doctest.
comment:5 Changed 8 years ago by robertwb
- Description modified (diff)
comment:6 Changed 8 years ago by robertwb
- Summary changed from [with patch] very minor bug in calculs _complex_ coercion. to [with patch, with review] very minor bug in calculs _complex_ coercion.
The patch is good, the problem is that none of the python functions (e.g. sqrt, sin) handle complex values.
comment:7 Changed 8 years ago by was
- Summary changed from [with patch, with review] very minor bug in calculs _complex_ coercion. to [with patch, needs another review] very minor bug in calculs _complex_ coercion.
Changed 8 years ago by was
comment:8 Changed 8 years ago by cwitty
- Summary changed from [with patch, needs another review] very minor bug in calculs _complex_ coercion. to [with patch, with positive review] very minor bug in calculs _complex_ coercion.
Looks good to me; doctests pass in sage/calculus and sage/rings. (Apply all three patches, in order.)
comment:9 Changed 8 years ago by mabshoff
- Resolution set to fixed
- Status changed from new to closed
Merged in 2.8.15.rc0.
Note: See
TracTickets for help on using
tickets.
I noticed this very slight mistake recently...