PARI/GP Bug report logs - #1305
gp core() function: could do better?

Package: pari-stable; Maintainer for pari-stable is Aurel Page <aurel.page@normalesup.org>; Source for pari-stable is src:pari-stable.

Reported by: Kevin Buzzard <k.buzzard@imperial.ac.uk>

Date: Mon, 19 Mar 2012 11:18:16 UTC

Severity: normal

Done: Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: allomber@math.u-bordeaux.fr
Subject: Bug#1305: gp core() function: could do better?
Reply-To: Kevin Buzzard <k.buzzard@imperial.ac.uk>, 1305@pari.math.u-bordeaux.fr
Resent-From: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Resent-To: bug-submit-list@pari.math.u-bordeaux.fr
Resent-CC: Karim.Belabas@math.u-bordeaux.fr
Resent-Date: Mon, 19 Mar 2012 11:18:16 UTC
Resent-Message-ID: <handler.1305.B.13321553114935@pari.math.u-bordeaux.fr>
Resent-Sender: allomber@math.u-bordeaux.fr
X-PARI/GP-PR-Message: report 1305
X-PARI/GP-PR-Package: pari-stable
X-PARI/GP-PR-Keywords: 
Received: via spool by submit@pari.math.u-bordeaux.fr id=B.13321553114935
          (code B ref -1); Mon, 19 Mar 2012 11:18:16 UTC
Received: (at submit) by pari.math.u-bordeaux.fr; 19 Mar 2012 11:08:31 +0000
Received: from smtp2.cc.ic.ac.uk ([155.198.5.156])
	by pari.math.u-bordeaux1.fr with esmtp (Exim 4.72)
	(envelope-from <k.buzzard@imperial.ac.uk>)
	id 1S9aRz-0001HY-39
	for submit@pari.math.u-bordeaux.fr; Mon, 19 Mar 2012 12:08:31 +0100
Received: from crackerjack.ma.ic.ac.uk ([155.198.192.80])
	by smtp2.cc.ic.ac.uk with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.77)
	(envelope-from <k.buzzard@imperial.ac.uk>)
	id 1S9aRt-0000Wn-KL
	for submit@pari.math.u-bordeaux.fr; Mon, 19 Mar 2012 11:08:25 +0000
Date: Mon, 19 Mar 2012 11:08:16 +0000 (GMT)
From: Kevin Buzzard <k.buzzard@imperial.ac.uk>
X-X-Sender: buzzard@crackerjack.ma.ic.ac.uk
To: submit@pari.math.u-bordeaux.fr
Message-ID: <Pine.LNX.4.64.1203191057430.22497@crackerjack.ma.ic.ac.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-IC-MsgID: 1S9aRt-0000Wn-KL
Package: pari-stable
Version: 2.5.0

[Sorry -- I should upgrade to 2.5.1, but I didn't yet, and I don't see 
core mentioned in the changelog 2.5.0->2.5.1 so let me gamble that this 
is still an issue]

What do you think of this?

(11:00) gp > isprime(10^1000+1)
%1 = 0
(11:00) gp > core(5*(10^1000+1)^2)
[gp now goes into a very long loop, presumably because it's trying to 
factor (10^1000+1)^2?]

I am not C++-savvy enough to know what the "core" function was doing in 
2.5.0, but in this particular case I can see a relatively simple way of spotting the 
answer: if we use trial division or ECM or whatever to find a few small 
factors, then could it be worth checking to see if what we have left is a 
square?? If it is then we're done. Presumably core() is not currently 
doing this...

Kevin



Send a report that this bug log contains spam.


Bill Allombert <allomber@math.u-bordeaux.fr>. Last modified: Sat Aug 26 17:04:59 2023; Machine Name: pari

PARI/GP Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.