Skip to content
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

AssertionError plotting real part of complex function with float coefficients #21428

Closed
paulmasson mannequin opened this issue Sep 6, 2016 · 20 comments
Closed

AssertionError plotting real part of complex function with float coefficients #21428

paulmasson mannequin opened this issue Sep 6, 2016 · 20 comments

Comments

@paulmasson
Copy link
Mannequin

paulmasson mannequin commented Sep 6, 2016

Attempting this plot produces the error:

sage: plot(real(sqrt(x - 1.*I)), (x,0,1))
...
/Users/Masson/Downloads/GitHub/sage/src/sage/symbolic/pynac.pyx in sage.symbolic.pynac.py_atan2 (/Users/Masson/Downloads/GitHub/sage/src/build/cythonized/sage/symbolic/pynac.cpp:18694)()
   1740     from sage.symbolic.constants import pi
   1741     parent = parent_c(x)
-> 1742     assert parent is parent_c(y)
   1743     if parent is ZZ:
   1744         parent = RR

AssertionError: 

Reported in this ask question.

Component: symbolics

Author: Ralf Stephan, Paul Masson

Branch/Commit: 8c1e1eb

Reviewer: Paul Masson, Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/21428

@paulmasson paulmasson mannequin added this to the sage-7.4 milestone Sep 6, 2016
@paulmasson paulmasson mannequin added c: symbolics labels Sep 6, 2016
@rwst
Copy link

rwst commented Sep 18, 2016

@rwst
Copy link

rwst commented Sep 18, 2016

Commit: 13e72f3

@rwst
Copy link

rwst commented Sep 18, 2016

New commits:

13e72f321428: be permissive in py_atan2

@rwst
Copy link

rwst commented Sep 18, 2016

Author: Ralf Stephan

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Sep 18, 2016

comment:3

Solves the plot problem, but needs doctests for arguments with different parents to illustrate the change.

Also, there are uncommitted changes for Pynac 0.6.9.1 that get included when this branch is checked out. They belong on another branch and ticket.

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Sep 18, 2016

Reviewer: Paul Masson

@paulmasson paulmasson mannequin added s: needs work and removed s: needs review labels Sep 18, 2016
@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Sep 18, 2016

comment:4

This simple change is likely to have future repercussions. Wouldn't it make more sense to determine both parents and use whichever is more general?

@rwst
Copy link

rwst commented Sep 19, 2016

@rwst
Copy link

rwst commented Sep 19, 2016

Changed commit from 13e72f3 to none

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Oct 6, 2016

Branch: u/paulmasson/21428

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Oct 6, 2016

comment:7

This modification allows plotting to function without invalidating existing doctests.


New commits:

791b564Allow plotting to function

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Oct 6, 2016

Commit: 791b564

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Oct 6, 2016

Changed author from Ralf Stephan to Ralf Stephan, Paul Masson

@paulmasson paulmasson mannequin added s: needs review and removed s: needs work labels Oct 6, 2016
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 13, 2016

Changed commit from 791b564 to 45a6b64

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 13, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

45a6b64Merge develop

@paulmasson
Copy link
Mannequin Author

paulmasson mannequin commented Nov 14, 2016

Changed branch from u/paulmasson/21428 to u/paulmasson/21428-1

@rwst
Copy link

rwst commented Dec 4, 2016

Changed reviewer from Paul Masson to Paul Masson, Ralf Stephan

@rwst
Copy link

rwst commented Dec 4, 2016

comment:10

I think this is okay, and it tests fine with ptestlong.


New commits:

8c1e1ebAllow plotting to function

@rwst
Copy link

rwst commented Dec 4, 2016

Changed commit from 45a6b64 to 8c1e1eb

@vbraun
Copy link
Member

vbraun commented Dec 5, 2016

Changed branch from u/paulmasson/21428-1 to 8c1e1eb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants