Hi Mike,
It are arrays (or vectors talking Scheme) of the digit type
http://www.clisp.org/impnotes/num-concepts.htmloops , page seems down : from my documentation
------------------------------------------
12.2.2.2. Bignum Limits
BIGNUMs are limited in size. Their maximum size is 32*(216-2)=2097088 bits. The largest representable BIGNUM is therefore 2^2097088-1.
12.2.2.3. Float Limits
Together with PI, the other LONG-FLOAT constants
LEAST-NEGATIVE-LONG-FLOAT LONG-FLOAT-EPSILON
LEAST-NEGATIVE-NORMALIZED-LONG-FLOAT LONG-FLOAT-NEGATIVE-EPSILON
LEAST-POSITIVE-LONG-FLOAT MOST-NEGATIVE-LONG-FLOAT
LEAST-POSITIVE-NORMALIZED-LONG-FLOAT MOST-POSITIVE-LONG-FLOAT
are recomputed whenever (EXT:LONG-FLOAT-DIGITS) is SETFed. They are not constant variables.
Warning
Since the exponent of a LONG-FLOAT is a signed 32-bits integer, MOST-POSITIVE-LONG-FLOAT is about 2231, which is much larger that the largest representable BIGNUM, which is less than 2221. This, obviously, means that ROUND, TRUNCATE, FLOOR and CEILING SIGNALs an ERROR on large LONG-FLOATs. Less obviously, this means that (FORMAT NIL "~E" MOST-POSITIVE-LONG-FLOAT) also fails.
---------------------------
NewLisp uses the GMP library which is only limitid by the available memory :
https://gmplib.org/pi-with-gmp.htmlSpeaking about big-numbers and Lisp macro's , I wrote something to memoize Fibonacci numbers // I'll work out something more clever, memoizing all fibonacci numbers lower than an entry -- here, try 30000 and 30000 again (the second time is should take no time)
(showing how Lisp becomes a programmable programming language )
best Rob (btw : this is Lisp running in interpreted mode)
--- also found a pdf describing the first LISP written by McCarthy (MIT) from the end 1950s -- could be perfectly rewritten/ simulated by a modern CL/Scheme/NewLisp app.
-- addendum , (after some thinking) a more clever memoizing needs the definition to be resursive in the way the "index" is counted down , this way it can stop calculation the moment a (lower) value matches.
NewLisp has very limited recursive capabilities and CLisp doesn't do tail call optimizations -- GCL does and also (most?) Schemes , but the question is , when the compiler converts into iteration is the function than still recongnizable for memoizing ?? (is there a difference between lexical and dynamical scoping then
?)
-- addendum 2 :
it works !!! functions need to be declared in a recursive way so that the memoized can be recongized during execution.
Due to the very limited stack in example 2 start with 100 (higher numbers will crash the system) , now you can build up higher p.e. (fib 120 will take no time , because (fib 100) is already known -- hmm , one can build in steps of 100 upwards now, every multiple of 100 will be memoized then , and every calculation < the highest memoized will take no time ...
yes, final result added in memofinal.exe -- calculations below 100000 should take no time now
.