Opened 8 years ago

Closed 8 years ago

#15118 closed defect (fixed)

ZeroDivisionError in MPF_pow not propagated in Cython mpmath

Reported by: eviatarbach 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 eviatarbach 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by eviatarbach

comment:1 Changed 8 years ago by eviatarbach

  • Status changed from new to needs_review

comment:2 Changed 8 years ago by eviatarbach

Patchbot apply trac15118.patch

comment:3 Changed 8 years ago by burcin

  • Authors set to Eviatar Bach
  • Reviewers set to Burcin Erocal
  • Status changed from needs_review to positive_review

Looks good to me.

comment:4 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.12.rc0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.