Python Number Limit(Python 数量限制)
问题描述
我知道在大多数情况下,如果不是所有编程语言、整数、浮点数等都有它们可以容纳的最大数量,无论是无符号的还是有符号的.比如pascal的int类型最多只能容纳32768~.
I know in most, if not all programming languages, integers, floats etc all have a maximum amount they can hold, either unsigned or signed. Eg pascal's int type can only hold up to 32768 ~.
我想知道的是,python 的 int 和浮点变量的限制是什么.我尝试了一个小程序来产生非常大的数字,但我没有遇到任何错误.它甚至对这些变量的大小有限制吗?
What i wanted to know was, what is the limit on python's int and floating point variables. I tried a little program to produce extremely large numbers, but i ran into no errors. Does it even have limits on how big these variables can be ?
我查看了文档,但找不到我要查找的内容:/
I looked in the documentation and couldn't find what i was looking for :/
非常感谢您的帮助,谢谢!
Help would be greatly appreciated, thanks !
推荐答案
早期版本对 int 有限制,现在去掉了,可以说没有限制,取决于内存您的计算机.查看这篇文章.
Earlier Versions had a limit on int but its removed now, so you can say there is no limit, it depends on the memory of your computer. Check this article.
这篇关于Python 数量限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Python 数量限制
基础教程推荐
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
