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

Handle errors in PARI -> CDF conversion #17329

Closed
williamstein opened this issue Nov 12, 2014 · 10 comments
Closed

Handle errors in PARI -> CDF conversion #17329

williamstein opened this issue Nov 12, 2014 · 10 comments

Comments

@williamstein
Copy link
Contributor

sage: CDF(pari(1e1000))
sig_error() without sig_on()
------------------------------------------------------------------------
Unhandled SIGABRT: An abort() occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Sage will now terminate.
------------------------------------------------------------------------
./sage: line 134:  7790 Aborted                 "$SAGE_ROOT/src/bin/sage" "$@"

CC: @pjbruin

Component: basic arithmetic

Author: Jeroen Demeyer

Branch/Commit: ff6ddb1

Reviewer: Peter Bruin

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

@williamstein
Copy link
Contributor Author

comment:1

This was found by Austin Tran, who reported

f(z)=zeta(z^2)
complex_plot(f,(-10,10),(-10,10),axes=False,figsize=[10,10],plot_points=1000)

which workes fine, but the same expression with zeta(z^3) instead returned the given error. In particular,

f(z)=zeta(z^3)
complex_plot(f,(-10,10),(-10,10),axes=False,figsize=[10,10],plot_points=1000)

gives an error. I tried doing this:


m=0
def f(z):
    global m
    m = z
    return zeta(z^3)

complex_plot(f,(-10,10),(-10,10),axes=False,figsize=[3,3],plot_points=100)

and found that the problem was caused when z = 0.505050505051 - 10.0*I. I then tried explicitly computing zeta(z^3) and got the core dump.

Worksheet: https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2014-11-12-complex-plot.sagews

@williamstein
Copy link
Contributor Author

comment:2

Workaround:

def f(z):
    return zeta(CC(z)^3)

complex_plot(f,(-10,10),(-10,10),axes=False,figsize=[3,3],plot_points=100)

@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title sage-6.4.rc1 (and earlier) crashes when evaluating zeta(CDF(-151.386325246 + 992.34771962*I)) Handle overflow in PARI -> CDF conversion Nov 13, 2014
@jdemeyer
Copy link

Branch: u/jdemeyer/ticket/17329

@jdemeyer
Copy link

Author: Jeroen Demeyer

@jdemeyer
Copy link

New commits:

ff6ddb1Handle errors in PARI -> CDF conversion

@jdemeyer
Copy link

Commit: ff6ddb1

@jdemeyer jdemeyer changed the title Handle overflow in PARI -> CDF conversion Handle errors in PARI -> CDF conversion Nov 14, 2014
@pjbruin
Copy link
Contributor

pjbruin commented Nov 14, 2014

Reviewer: Peter Bruin

@pjbruin
Copy link
Contributor

pjbruin commented Nov 14, 2014

comment:8

Looks like the right solution to me and passes doctests.

@vbraun
Copy link
Member

vbraun commented Nov 15, 2014

Changed branch from u/jdemeyer/ticket/17329 to ff6ddb1

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

4 participants