Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

Re: bignum limits

 Re: bignum limits From: Bruno Haible - 2004-12-21 18:51:07 ```Sam wrote: > bignums are stored in uint32[N] with N<= 2^16-2. > why "-2"? I don't understand this either. I thought it would be 2^16-1. But this is not important. > why ^16 and not ^array-total-size-max Because 1. a two-byte length field is more effcient to access than a 3-byte length field, and 2. as explained in comp.lang.lisp, a reasonable error message is preferrable to math operations that consume 500 MB of RAM or 10 days of time. (Think about the user who wanted to square his number 10 times but through a simple programming mistake is squaring it 30 times.) Bruno ```

 Re: clisp/doc impbody.xml,1.332,1.333 From: Sam Steingold - 2004-12-21 15:45:51 ```> * Bruno Haible [2004-12-20 21:08:13 +0000]: > > Update of /cvsroot/clisp/clisp/doc > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25212 > > +Bignum Limits: Bignums are limited in size. Their maximum size is > +2097088 bits. The largest representable bignum is > +22097088-1. what is 2097088? (ash 1 21) ==> 2097152 -- Sam Steingold (http://www.podval.org/~sds) running w2k ; ; ; ; ; My other CAR is a CDR. ```
 Re: clisp/doc impbody.xml,1.332,1.333 From: Bruno Haible - 2004-12-21 16:04:09 ```Sam wrote: > > +Bignum Limits: Bignums are limited in size. Their maximum size is > > +2097088 bits. The largest representable bignum is > > +22097088-1. > > what is 2097088? (* 32 65534). Bruno ```
 Re: clisp/doc impbody.xml,1.332,1.333 From: Sam Steingold - 2004-12-21 17:33:31 ```> * Bruno Haible [2004-12-21 17:02:04 +0100]: > > Sam wrote: >> > +Bignum Limits: Bignums are limited in size. Their maximum size is >> > +2097088 bits. The largest representable bignum is >> > +22097088-1. >> >> what is 2097088? > > (* 32 65534). bignums are stored in uint32[N] with N<= 2^16-2. why "-2"? why ^16 and not ^array-total-size-max thanks. -- Sam Steingold (http://www.podval.org/~sds) running w2k ; ; ; ; ; Daddy, why doesn't this magnet pick up this floppy disk? ```
 Re: bignum limits From: Bruno Haible - 2004-12-21 18:51:07 ```Sam wrote: > bignums are stored in uint32[N] with N<= 2^16-2. > why "-2"? I don't understand this either. I thought it would be 2^16-1. But this is not important. > why ^16 and not ^array-total-size-max Because 1. a two-byte length field is more effcient to access than a 3-byte length field, and 2. as explained in comp.lang.lisp, a reasonable error message is preferrable to math operations that consume 500 MB of RAM or 10 days of time. (Think about the user who wanted to square his number 10 times but through a simple programming mistake is squaring it 30 times.) Bruno ```