Opened 9 years ago

Closed 9 years ago

#15118 closed defect (fixed)

ZeroDivisionError in MPF_pow not propagated in Cython mpmath

Reported by: Eviatar Bach Owned by:
Priority: major Milestone: sage-5.12
Component: numerical Keywords:
Cc: Fredrik Johansson Merged in: sage-5.12.rc0
Authors: Eviatar Bach Reviewers: Burcin Erocal
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

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.

Attachments (1)

trac15118.patch (1.8 KB) - added by Eviatar Bach 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Eviatar Bach

Attachment: trac15118.patch added

comment:1 Changed 9 years ago by Eviatar Bach

Status: newneeds_review

comment:2 Changed 9 years ago by Eviatar Bach

Patchbot apply trac15118.patch

comment:3 Changed 9 years ago by Burcin Erocal

Authors: Eviatar Bach
Reviewers: Burcin Erocal
Status: needs_reviewpositive_review

Looks good to me.

comment:4 Changed 9 years ago by Jeroen Demeyer

Merged in: sage-5.12.rc0
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.