[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: large primes
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: large primes |
Date: |
03 Jun 2005 09:41:43 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
Robert Boyer <address@hidden> writes:
> On first inspection, it appears that none of Allegro, CMU Lisp, or Clisp can
> deal with the largest known prime:
>
> (- (expt 2 25964951) 1)
>
> So GCL is doing well, save in the printing department!
>
Just a further note for future referece, now that we have C stack
overflow trapping -- there are at least three places of deep recursion
in GCL, the printer, the reader, and marking cons. eval doesn't
appear so bad, and read has a non-recursive version already. We'd
discussed previously that cons marking should continue with the Waite
et.al. algorithm on cstack overflow. I'm going to try to implement a
C stack enlargement from within lisp and see how bad our printing
overlow above actually is.
Take care,
> Bob
>
> -------------------------------------------------------------------------------
>
> % acl
> International Allegro CL Enterprise Edition
> 6.2 [Linux (x86)] (Jun 26, 2002 11:17)
> Copyright (C) 1985-2002, Franz Inc., Berkeley, CA, USA. All Rights Reserved.
>
> This development copy of Allegro CL is licensed to:
> [TC8015] University of Texas at Austin
>
> ;; Optimization settings: safety 1, space 1, speed 1, debug 2.
> ;; For a complete description of all compiler switches given the
> ;; current optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS).
> CL-USER(1): (- (expt 2 25964951) 1)
> Error: Attempt to create an integer which is too large to represent.
> [condition type: SIMPLE-ERROR]
>
> Restart actions (select using :continue):
> 0: Return to Top Level (an "abort" restart).
> 1: Abort entirely from this process.
> [1] CL-USER(2):
>
> -------------------------------------------------------------------------------
>
> [1]> (- (expt 2 25964951) 1)
>
> *** - overflow during multiplication of large numbers
>
> -------------------------------------------------------------------------------
> * (- (expt 2 25964951) 1)
>
>
> Error in function KERNEL::INTEXP:
> The absolute value of 25964951 exceeds
> EXTENSIONS:*INTEXP-MAXIMUM-EXPONENT*.
> [Condition of type SIMPLE-ERROR]
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah