Ticket #4084 (closed defect: fixed)
[with patch, positive review] plot(1/cos,-1,1) fails
| Reported by: | jwmerrill | Owned by: | jwmerrill |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.1.2 |
| Component: | graphics | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
Plot works with symbolic functions, but not compositions or arithmetic involving them.
sage: plot(cos,-1,1) #works sage: plot(1/cos,-1,1) Traceback (most recent call last): ... TypeError: float() argument must be a string or a number
Attachments
Change History
comment:1 Changed 5 years ago by mabshoff
- Summary changed from plot(1/cos,-1,1) fails to [with patch, needs work] plot(1/cos,-1,1) fails
Hi,
this is fixed in 3.1.2.rc1-ish:
mabshoff@sage:/scratch/mabshoff/release-cycle/sage-3.1.2.rc1$ ./sage ---------------------------------------------------------------------- | SAGE Version 3.1.2.rc0, Release Date: 2008-09-06 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: plot(1/cos,-1,1) sage: Exiting SAGE (CPU time 0m0.63s, Wall time 0m4.01s). Exiting spawned Maxima process.
Please post a patch that adds only the doctest. There are unrelated changes in the patch.
Cheers,
Michael
comment:2 follow-up: ↓ 3 Changed 5 years ago by jwmerrill
- Summary changed from [with patch, needs work] plot(1/cos,-1,1) fails to [with patch, needs review] plot(1/cos,-1,1) fails
4804_doctest_only.patch adds only doctests. If accepted, only that patch should be applied. This should not be accepted until the new doctests actually pass.
Thanks for the quick catch mhansen. "Unrelated" might be a little strong, though I was bold in modifying implementation to make this work. In any case, sounds like problem solved.
Cheers,
JM
comment:3 in reply to: ↑ 2 Changed 5 years ago by mabshoff
Replying to jwmerrill:
4804_doctest_only.patch adds only doctests. If accepted, only that patch should be applied. This should not be accepted until the new doctests actually pass.
I rebased the patch against my current merge tree.
Thanks for the quick catch mhansen. "Unrelated" might be a little strong, though I was bold in modifying implementation to make this work. In any case, sounds like problem solved.
It wasn't mhansen ;). The changes in plot.py had *zero* to do with the ticket and the "fix" is canonically wrong since we just don't just wipe out low order bits preventatively.
Cheers,
JM
Cheers,
Michael

