-
-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doctest fix for: cot(float) returns complex #21365
Comments
comment:2
|
comment:3
When inserting a print at this line:
which is exactly |
comment:4
I downloaded older binaries to determine the version in which this error first occurs. The cotangent plots just fine in 7.1 and fails in 7.2. Sage 7.2.rc1 included Pynac 0.6.5, which is precisely the last time the cotangent function was modified in Pynac. That is unlikely to be a coincidence. This is not a graphics issue. The plotting method returning the error hasn't been modified in years. And this is not the first time in my experience a change in Pynac has had consequences for plotting (#20818). |
comment:5
The issue is when you pass a floating point, not a sage: cot(float(0.5))
(1.8304877217124513+0j) in contrast with: sage: type(sin(float(1.1)))
<type 'float'> Thus the bug is likely coming from that the internal plot functions use python/machine floating points as they are Python (i.e., not run through the Sage preparser). |
comment:6
Tracing slightly further, the python |
comment:7
Okay, I'm not quite sure what happens. It seems to fall into the generic |
This comment has been minimized.
This comment has been minimized.
Upstream: Reported upstream. No feedback yet. |
comment:10
Will be fixed in the next release of Pynac. |
Changed upstream from Reported upstream. No feedback yet. to Fixed upstream, in a later stable release. |
comment:11
I confirm this is fixed in #21623 so this ticked is duplicate. |
Reviewer: Travis Scrimshaw |
comment:12
Confirmed as well. |
Changed upstream from Fixed upstream, in a later stable release. to none |
comment:13
I'll reuse this ticket for the doctests. |
Changed reviewer from Travis Scrimshaw to none |
Commit: |
New commits:
|
Author: Ralf Stephan |
Reviewer: Travis Scrimshaw |
Changed branch from u/rws/doctest_fix_for__cot_float__returns_complex to |
This causes a plot of cot() on the real axis to fail. Sample output:
There is no problem plotting 1/tan().
Component: symbolics
Author: Ralf Stephan
Branch/Commit:
c0ef7a5
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/21365
The text was updated successfully, but these errors were encountered: