* bug#15626: calc prime test fails for numbers > 8 million
@ 2013-10-16 0:32 Glenn Morris
2013-10-17 3:39 ` Jay Belanger
0 siblings, 1 reply; 2+ messages in thread
From: Glenn Morris @ 2013-10-16 0:32 UTC (permalink / raw)
To: 15626
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 )
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#15626: calc prime test fails for numbers > 8 million
2013-10-16 0:32 bug#15626: calc prime test fails for numbers > 8 million Glenn Morris
@ 2013-10-17 3:39 ` Jay Belanger
0 siblings, 0 replies; 2+ messages in thread
From: Jay Belanger @ 2013-10-17 3:39 UTC (permalink / raw)
To: 15626-done
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-17 3:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-16 0:32 bug#15626: calc prime test fails for numbers > 8 million Glenn Morris
2013-10-17 3:39 ` Jay Belanger
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).