From unknown Tue Jun 24 05:13:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15626: calc prime test fails for numbers > 8 million Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: jay.p.belanger@gmail.com, bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Oct 2013 00:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15626 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 15626@debbugs.gnu.org Cc: Jay Belanger X-Debbugs-Original-To: submit@debbugs.gnu.org X-Debbugs-Original-Xcc: Jay Belanger Received: via spool by submit@debbugs.gnu.org id=B.138188354527314 (code B ref -1); Wed, 16 Oct 2013 00:33:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Oct 2013 00:32:25 +0000 Received: from localhost ([127.0.0.1]:53010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VWF2E-00076R-EF for submit@debbugs.gnu.org; Tue, 15 Oct 2013 20:32:22 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:45626 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VWF28-000768-JX for submit@debbugs.gnu.org; Tue, 15 Oct 2013 20:32:17 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VWF27-0004l6-Du; Tue, 15 Oct 2013 20:32:15 -0400 From: Glenn Morris X-Spook: Pine Gap Taiwan investigation argus Mena CISU smuggle X-Ran: -.g@vL)7:SA)\tLM$ZaYHa-PwA/<;=c@ETt`4n;fCLQ>xSEEmq("t\/BK%Vj{.2-McRqUW X-Hue: magenta X-Attribution: GM Date: Tue, 15 Oct 2013 20:32:15 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.5 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) Package: emacs Version: 24.3 On x86_64 GNU/Linux: emacs -Q -f calc 8000000 RET k p -> Wrong type argument: listp, 8000000 Any number >= 8000000 (but < math-small-integer-size) fails in this way. The problem is the (% (nth 1 n) 2) 0) of math-prime-test, which still expects numbers larger than 8000000 to be in (bigpos ... ) list format, but the limit is much greater than that these days. The calc manual is likewise outdated: 19.5.7.1 Data Type Formats [...] Large integers are stored as lists of the form `(bigpos D0 D1 D2 ...)' for positive integers 1000000 or more, (First reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679753 ) From unknown Tue Jun 24 05:13:27 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Glenn Morris Subject: bug#15626: closed (Re: bug#15626: calc prime test fails for numbers > 8 million) Message-ID: References: <87y55swooy.fsf@gmail.com> X-Gnu-PR-Message: they-closed 15626 X-Gnu-PR-Package: emacs Reply-To: 15626@debbugs.gnu.org Date: Thu, 17 Oct 2013 03:40:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1381981204-27167-1" This is a multi-part message in MIME format... ------------=_1381981204-27167-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #15626: calc prime test fails for numbers > 8 million which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 15626@debbugs.gnu.org. --=20 15626: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15626 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1381981204-27167-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 15626-done) by debbugs.gnu.org; 17 Oct 2013 03:39:55 +0000 Received: from localhost ([127.0.0.1]:54863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VWeRG-00073m-Rr for submit@debbugs.gnu.org; Wed, 16 Oct 2013 23:39:55 -0400 Received: from mail-ie0-f175.google.com ([209.85.223.175]:47626) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VWeRE-00073Z-2c for 15626-done@debbugs.gnu.org; Wed, 16 Oct 2013 23:39:52 -0400 Received: by mail-ie0-f175.google.com with SMTP id aq17so2877970iec.20 for <15626-done@debbugs.gnu.org>; Wed, 16 Oct 2013 20:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:reply-to:cc:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=0D4B5wBBhTW8C9VqH4WB+MrdpPQ7sGNGF/sXeyeqpf0=; b=NlHEkhJSPJezDb6w6dBAVhQoD4m1BkSTxJrGkxP/RTKc0m4HrPN4B09YXi2w9B0xXr MDRBV5whif39l05brVyg11tc7tG64XycR0ZmCmnU+PNKDfYb56/cI0Dm1izGDfCY0sf6 MXafib50qxXST10+oXJAHx3fKVAh7srTcg1jU7JKLCg/c6hOr58bXXK/mfnLv8/xUtyz 2OfP0aBLkhk4xTgQ5JCbsdCvkchOeTwQvVEauZLUaTOCnmyQw0wRFSZrsO/CoRbe2jLP eByNzhD5K55WoSMXOLzVOjDFYs250OdwwcdW7ScUzZZcxsNIlAMRAF4VDXwFoI09/tjX 6MBQ== X-Received: by 10.50.136.137 with SMTP id qa9mr24547826igb.42.1381981186174; Wed, 16 Oct 2013 20:39:46 -0700 (PDT) Received: from belanger-home (184-155-87-143.cpe.cableone.net. [184.155.87.143]) by mx.google.com with ESMTPSA id i11sm6458313igh.0.2013.10.16.20.39.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 16 Oct 2013 20:39:45 -0700 (PDT) From: Jay Belanger To: 15626-done@debbugs.gnu.org Subject: Re: bug#15626: calc prime test fails for numbers > 8 million References: Date: Wed, 16 Oct 2013 22:39:41 -0500 In-Reply-To: (Glenn Morris's message of "Tue, 15 Oct 2013 20:32:15 -0400") Message-ID: <87y55swooy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15626-done Cc: Glenn Morris , jay.p.belanger@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: jay.p.belanger@gmail.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > On x86_64 GNU/Linux: > > emacs -Q -f calc > 8000000 RET > k p > -> Wrong type argument: listp, 8000000 > > Any number >= 8000000 (but < math-small-integer-size) fails in this way. > > The problem is the > > (% (nth 1 n) 2) 0) > > of math-prime-test, which still expects numbers larger than 8000000 to > be in (bigpos ... ) list format, but the limit is much greater than that > these days. > > The calc manual is likewise outdated: Thanks; this has been fixed in bzr. (I should increase the size of math-primes-table when I get the chance, too.) > (First reported at > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679753 ) Ack; I never saw this. ------------=_1381981204-27167-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 Oct 2013 00:32:25 +0000 Received: from localhost ([127.0.0.1]:53010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VWF2E-00076R-EF for submit@debbugs.gnu.org; Tue, 15 Oct 2013 20:32:22 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:45626 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VWF28-000768-JX for submit@debbugs.gnu.org; Tue, 15 Oct 2013 20:32:17 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VWF27-0004l6-Du; Tue, 15 Oct 2013 20:32:15 -0400 From: Glenn Morris To: submit@debbugs.gnu.org Subject: calc prime test fails for numbers > 8 million X-Debbugs-CC: Jay Belanger X-Spook: Pine Gap Taiwan investigation argus Mena CISU smuggle X-Ran: -.g@vL)7:SA)\tLM$ZaYHa-PwA/<;=c@ETt`4n;fCLQ>xSEEmq("t\/BK%Vj{.2-McRqUW X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 15 Oct 2013 20:32:15 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) Package: emacs Version: 24.3 On x86_64 GNU/Linux: emacs -Q -f calc 8000000 RET k p -> Wrong type argument: listp, 8000000 Any number >= 8000000 (but < math-small-integer-size) fails in this way. The problem is the (% (nth 1 n) 2) 0) of math-prime-test, which still expects numbers larger than 8000000 to be in (bigpos ... ) list format, but the limit is much greater than that these days. The calc manual is likewise outdated: 19.5.7.1 Data Type Formats [...] Large integers are stored as lists of the form `(bigpos D0 D1 D2 ...)' for positive integers 1000000 or more, (First reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679753 ) ------------=_1381981204-27167-1--