# Ticket #9595: 9595.patch

File 9595.patch, 1.4 KB (added by jdemeyer, 3 years ago)
• ## sage/rings/integer.pyx

```# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1280061267 -7200
# Node ID aa1613b4cd2bdee2bc451679b9e491d0745c3fed
# Parent  af5f40a73eda5a6a0a811ef973ce57180b48953e
#9595: simplify() before converting PARI gen to QQ.

diff -r af5f40a73eda -r aa1613b4cd2b sage/rings/integer.pyx```
 a 18 sage: Integer('012') 10 Conversion from PARI:: sage: Integer(pari('-10380104371593008048799446356441519384')) -10380104371593008048799446356441519384 sage: Integer(pari('Pol([-3])')) -3 """ def __cinit__(self):
• ## sage/rings/rational.pyx

`diff -r af5f40a73eda -r aa1613b4cd2b sage/rings/rational.pyx`
 a sage: Rational(pari('-939082/3992923')) -939082/3992923 sage: Rational(pari('Pol([-1/2])'))  #9595 -1/2 """ def __cinit__(self): global the_rational_ring mpq_canonicalize(self.value) elif isinstance(x, sage.libs.pari.all.pari_gen): x = x.simplify() if typ((x).g) == t_FRAC: t_FRAC_to_QQ(self.value, (x).g) elif typ((x).g) == t_INT: