Skip to content

doctest fixed Pynac RuntimeErrors #17321

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

Closed
vbraun opened this issue Nov 12, 2014 · 22 comments
Closed

doctest fixed Pynac RuntimeErrors #17321

vbraun opened this issue Nov 12, 2014 · 22 comments

Comments

@vbraun
Copy link
Member

vbraun commented Nov 12, 2014

Series times variable raises the following exception:

sage: ex = sin(x).series(x==0, 3) * x
sage: str(ex)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-5-c277618b0823> in <module>()
----> 1 str(ex)

/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/structure/sage_object.so in sage.structure.sage_object.SageObject.__repr__ (build/cythonized/sage/structure/sage_object.c:1962)()

/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression._repr_ (build/cythonized/sage/symbolic/expression.cpp:4749)()

/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/sage/symbolic/ring.so in sage.symbolic.ring.SymbolicRing._repr_element_ (build/cythonized/sage/symbolic/ring.cpp:8462)()

RuntimeError: comparing typeid's

pynac/pynac#22
pynac/pynac#32
pynac/pynac#33

Depends on #18362

CC: @burcin

Component: symbolics

Author: Ralf Stephan

Branch/Commit: 420af54

Reviewer: Jeroen Demeyer

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

@vbraun vbraun added this to the sage-6.4 milestone Nov 12, 2014
@rwst
Copy link
Contributor

rwst commented Dec 11, 2014

comment:1

I get the same(?) error in the current #7660.

sage: theta = var('theta')
sage: eqn =   (x^3 + theta < sin(x*theta))
sage: eqn/theta
<repr(<sage.symbolic.expression.Expression at 0x7f3fe34efef0>) failed: RuntimeError: comparing typeid's>

@rwst
Copy link
Contributor

rwst commented Apr 25, 2015

comment:2

Also, from comment 16 of #12967:

sage: cmp(SR(oo), sqrt(2))
RuntimeError: comparing typeid's

@rwst

This comment has been minimized.

@rwst
Copy link
Contributor

rwst commented Apr 25, 2015

Upstream: Reported upstream. Developers acknowledge bug.

@rwst rwst modified the milestones: sage-6.4, sage-6.7 Apr 25, 2015
@rwst
Copy link
Contributor

rwst commented May 2, 2015

Dependencies: pynac-0.3.7

@rwst
Copy link
Contributor

rwst commented May 2, 2015

Changed upstream from Reported upstream. Developers acknowledge bug. to Fixed upstream, in a later stable release.

@rwst
Copy link
Contributor

rwst commented May 2, 2015

comment:3

With the latest commit in Pynac we now have:

sage: ex = sin(x).series(x==0, 3) * x
sage: str(ex)
'x*(1*x + Order(x^3))'
sage: cmp(SR(oo), sqrt(2))
1
sage: bool(SR(oo) < sqrt(2))  
False
sage: bool(SR(oo) > sqrt(2))
False

This means there is no longer a runtime error, there is however still code missing in Pynac and Sage to correctly handle these requests (see #12967 and the discussion in #18393).

@rwst
Copy link
Contributor

rwst commented May 4, 2015

Changed dependencies from pynac-0.3.7 to #18362, #12967

@rwst
Copy link
Contributor

rwst commented May 4, 2015

Changed upstream from Fixed upstream, in a later stable release. to none

@rwst

This comment has been minimized.

@rwst
Copy link
Contributor

rwst commented Jul 12, 2015

comment:5

The last of the cases given in the comments is now fixed in #18877, so this ticket should doctest all related ones.

@rwst rwst modified the milestones: sage-6.7, sage-6.8 Jul 12, 2015
@rwst rwst changed the title Pynac RuntimeError: comparing typeid's doctest fixed Pynac RuntimeErrors Jul 12, 2015
@rwst
Copy link
Contributor

rwst commented Jul 12, 2015

Changed dependencies from #18362, #12967 to #18362

@rwst
Copy link
Contributor

rwst commented Jul 16, 2015

comment:7

Wrong, the cmp problem still remains...

sage: cmp(SR(oo), sqrt(2))
1
sage: cmp(SR(-oo), sqrt(2))
1
sage: cmp(sqrt(2), SR(oo))
1
sage: cmp(sqrt(2), SR(-oo))
1

but this is clearly #16397 so this ticket should doctest the bool fixes.

@rwst
Copy link
Contributor

rwst commented Jul 16, 2015

@rwst
Copy link
Contributor

rwst commented Jul 16, 2015

New commits:

522bf9617321: doctest fixed Pynac RuntimeErrors

@rwst
Copy link
Contributor

rwst commented Jul 16, 2015

Commit: 522bf96

@rwst
Copy link
Contributor

rwst commented Jul 16, 2015

Author: Ralf Stephan

@jdemeyer
Copy link
Contributor

comment:10

Please remove all those bools. You can just write assert(x > y) or assert(not x > y).

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 16, 2015

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

420af5417321: replace bool with assert in doctests

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 16, 2015

Changed commit from 522bf96 to 420af54

@jdemeyer
Copy link
Contributor

Reviewer: Jeroen Demeyer

@vbraun
Copy link
Member Author

vbraun commented Jul 18, 2015

Changed branch from u/rws/doctest_fixed_pynac_runtimeerrors to 420af54

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

3 participants