Tuesday, September 29, 2009

Bignum in GNU CLISP

Today I read the document  http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/typ...  , find that there is a type named bignum. But I can not find any more information about it. After posting on the Comp.Lang.Lisp, I got some information from Tamas and Pascal
Bignums: you may restrict integers to a certain range, making them fixnums.  Integers which are not fixnums are bignums. 
Actually , we do not need worry about it. The CL implement will choose the right representation for us.
CL-USER> (type-of (1+ most-positive-fixnum)) 
(INTEGER 536870912) 
CL-USER> (typep (1+ most-positive-fixnum) 'bignum) 

No comments:

Post a Comment