Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why in LISP , there is no limitation for number?

Tags:

numbers

lisp

I can even calculate (expt 32768 32768) and I got:

476170470581645852036305042887575891541065808607552399123930385521914333389668342420684974786564569494856176035326322058077805659331026192708460314150258592864177116725943603718461857357598351152301645904403697613233287231227125684710820209725157101726931323469678542580656697935045997268352998638215525166389437335543602135433229604645318478604952148193555853611059596230656

like image 712
Don Lun Avatar asked May 05 '11 06:05

Don Lun


Video Answer


1 Answers

Lisp automatically switches math to use a bignum package when it sees this kind of thing. But there is a limitation. Make your numbers big enough, and you may require more bits to represent it than there are atoms in the known universe. Then your system memory will probably be exhausted. :)

like image 74
Ted Hopp Avatar answered Oct 21 '22 08:10

Ted Hopp