Opened 5 years ago

Closed 5 years ago

#17811 closed defect (fixed)

RealBall: sig_on for arb_to_mpfi

Reported by: cheuberg Owned by:
Priority: major Milestone: sage-6.6
Component: numerical Keywords: arb, RealBall
Cc: mmezzarobba, fredrik.johansson Merged in:
Authors: Clemens Heuberger Reviewers: Marc Mezzarobba
Report Upstream: N/A Work issues:
Branch: 33ee7f2 (Commits) Commit: 33ee7f2684135f852380df31cac85d73f204ce9a
Dependencies: #17194 Stopgaps:

Description

As discussed in #17194, arb_to_mpfi might run into an overflow and this should be guarded by a sig_on/sig_off pair.

Change History (9)

comment:1 Changed 5 years ago by cheuberg

  • Branch set to u/cheuberg/rings/real_arb_sig_arb_to_mpfi

comment:2 Changed 5 years ago by cheuberg

  • Commit set to dce7ed3d77f978748627a223b6bd39a2c2b05b76
  • Component changed from PLEASE CHANGE to numerical
  • Status changed from new to needs_review

The doctest checking whether this actually works is clumsy as the necessary arithmetic operations are not readily available yet; so this has to be done in cython. Eventually, the doctest should be replaced.


Last 10 new commits:

aa39c10#17194 RealBall: abstract away access to parent precision
d3e3998#17194 RBF: add a precision() method
ce51f81#17194 RBF: some more is_foo() and similar methods
1d92acfTrac #17194: remove fmpr.pxd (partial revert of dd8933a)
5e41fcbTrac #17194: remove imports of fmpr
4e7ec46Trac #17194: is_zero, is_nonzero, is_exact
9e26152Trac #17194: Implement comparisons
1196b57Trac #17194: Fix RealBallField._an_element_
195a6eeTrac #17194: Fix two broken references
dce7ed3Trac #17811: sig_on for arb_to_mpfi

comment:3 follow-up: Changed 5 years ago by jdemeyer

  • Status changed from needs_review to needs_work

According to the doctest, your exception is ignored. See http://docs.cython.org/src/userguide/language_basics.html#error-return-values for how to fix this.

comment:4 Changed 5 years ago by git

  • Commit changed from dce7ed3d77f978748627a223b6bd39a2c2b05b76 to 4215322245221e4b472124b8d8dc2f902ca27d39

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

0e5b904Trac #17811: declare exception value
4215322Trac #17811: catch error and free memory in any case

comment:5 in reply to: ↑ 3 Changed 5 years ago by cheuberg

  • Status changed from needs_work to needs_review

Replying to jdemeyer:

According to the doctest, your exception is ignored. See http://docs.cython.org/src/userguide/language_basics.html#error-return-values for how to fix this.

Thanks for the pointer, fixed.

comment:6 Changed 5 years ago by jdemeyer

Instead of cdef void ..... except * it's more efficient to do cdef int ..... except -1.

comment:7 Changed 5 years ago by git

  • Commit changed from 4215322245221e4b472124b8d8dc2f902ca27d39 to 33ee7f2684135f852380df31cac85d73f204ce9a

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

33ee7f2Trac #17811: use int ... except -1: instead of void ... except *

comment:8 Changed 5 years ago by mmezzarobba

  • Reviewers set to Marc Mezzarobba
  • Status changed from needs_review to positive_review

comment:9 Changed 5 years ago by vbraun

  • Branch changed from u/cheuberg/rings/real_arb_sig_arb_to_mpfi to 33ee7f2684135f852380df31cac85d73f204ce9a
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.