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

ZeroDivisionError in MPF_pow not propagated in Cython mpmath #15118

Closed
eviatarbach opened this issue Aug 28, 2013 · 6 comments
Closed

ZeroDivisionError in MPF_pow not propagated in Cython mpmath #15118

eviatarbach opened this issue Aug 28, 2013 · 6 comments

Comments

@eviatarbach
Copy link

Currently, the following occurs:

sage: import mpmath
sage: mpmath.mpf(0)^(-2)
Exception ZeroDivisionError: ZeroDivisionError() in 'sage.libs.mpmath.ext_impl.MPF_pow' ignored
mpf('0.0')

This also causes problems in other functions (this should be a singularity of the function):

sage: mpmath.zeta(2r,-4r)
Exception ZeroDivisionError: ZeroDivisionError() in 'sage.libs.mpmath.ext_impl.MPF_pow' ignored
mpf('3.0685451779593373')

This is because the MPF_pow Cython function does not declare an exception value.

CC: @fredrik-johansson

Component: numerical

Author: Eviatar Bach

Reviewer: Burcin Erocal

Merged: sage-5.12.rc0

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

@eviatarbach eviatarbach added this to the sage-5.12 milestone Aug 28, 2013
@eviatarbach
Copy link
Author

comment:1

Attachment: trac15118.patch.gz

@eviatarbach
Copy link
Author

comment:2

Patchbot apply trac15118.patch

@burcin
Copy link

burcin commented Sep 6, 2013

Reviewer: Burcin Erocal

@burcin
Copy link

burcin commented Sep 6, 2013

Author: Eviatar Bach

@burcin
Copy link

burcin commented Sep 6, 2013

comment:3

Looks good to me.

@jdemeyer
Copy link

jdemeyer commented Oct 1, 2013

Merged: sage-5.12.rc0

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