为什么在LISP中没有数量限制? [英] Why in LISP , there is no limitation for number?

查看:65
本文介绍了为什么在LISP中没有数量限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我什至可以计算(expt 32768 32768),我得到了:

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

4761704705816458520363050428875758915410658086075523991239303855219143333896683424206849745665694994961760353263220580778056593310261927084603141502585928641771167259436037184618573575983511523016459044036976132872312271256847108972972230654654609697654654567654695567654654567567654654654692567654654654654567695654654567567654654567654654654654654659654654659654654659654654654654654654654654654654654654654654654654697567365

476170470581645852036305042887575891541065808607552399123930385521914333389668342420684974786564569494856176035326322058077805659331026192708460314150258592864177116725943603718461857357598351152301645904403697613233287231227125684710820209725157101726931323469678542580656697935045997268352998638215525166389437335543602135433229604645318478604952148193555853611059596230656

推荐答案

Lisp自动切换数学以使用 bignum 包,当它出现这种情况时.但是有一个局限性.使您的数字足够大,与已知宇宙中的原子数相比,您可能需要更多的位来表示它.然后,您的系统内存可能已耗尽. :)

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. :)

这篇关于为什么在LISP中没有数量限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆