Opened 8 years ago

Closed 8 years ago

#12636 closed defect (fixed)

0.is_squarefree() raises a PariError

Reported by: johanbosman Owned by: AlexGhitza
Priority: major Milestone: sage-5.0
Component: basic arithmetic Keywords: pari integer squarefree
Cc: Merged in: sage-5.0.beta14
Authors: Johan Bosman Reviewers: Jeroen Demeyer
Report Upstream: Fixed upstream, but not in a stable release. Work issues:
Branch: Commit:
Dependencies: #12638 Stopgaps:

Description (last modified by johanbosman)

0.is_sage: 0.is_squarefree()
---------------------------------------------------------------------------
PariError                                 Traceback (most recent call last)

/Users/jgbosman/<ipython console> in <module>()

/usr/local/share/sage/sage-5.0.beta4/local/lib/python2.7/site-packages/sage/rings/integer.so in sage.rings.integer.Integer.is_squarefree (sage/rings/integer.c:27127)()

/usr/local/share/sage/sage-5.0.beta4/local/lib/python2.7/site-packages/sage/libs/pari/gen.so in sage.libs.pari.gen._pari_trap (sage/libs/pari/gen.c:49413)()

PariError:  (5)

This bug was probably introduced with the recent Pari upgrade, as older versions of Sage do output False.

Reported upstream: http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1304

Attachments (1)

12636_doctest.patch (592 bytes) - added by johanbosman 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by johanbosman

  • Report Upstream changed from N/A to Reported upstream. Little or no feedback.

I've reported it upstream as this is clearly a Pari bug:

? issquarefree(0)
  ***   at top-level: issquarefree(0)
  ***                 ^---------------
  *** issquarefree: zero argument in an arithmetic function.
  ***   Break loop: type 'break' to go back to GP

In older Pari versions we do get 0 as output.

comment:2 Changed 8 years ago by johanbosman

  • Report Upstream changed from Reported upstream. Little or no feedback. to Fixed upstream, but not in a stable release.

It's been fixed in Pari now.

 commit a88346aab1539104c06ba0a73203913245d72589
 Author: Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr>
 Date:   Sun Mar 18 23:54:02 2012 +0100

comment:3 Changed 8 years ago by johanbosman

  • Description modified (diff)

comment:4 Changed 8 years ago by jdemeyer

Fixed in #12638. It would be good if this ticket would add a doctest to the is_squarefree() function.

comment:5 Changed 8 years ago by jdemeyer

  • Dependencies set to #12638

Changed 8 years ago by johanbosman

comment:6 Changed 8 years ago by johanbosman

  • Authors set to Johan Bosman
  • Status changed from new to needs_review

comment:7 Changed 8 years ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to positive_review

comment:8 Changed 8 years ago by jdemeyer

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