【发布时间】:2020-12-31 08:19:04
【问题描述】:
在 C++ 中,我可以使用ul 或1ul,它们代表unsigned long int,其值为1,在位级别表示为:00000000000000000000000000000001。同样我们可以使用2ul等等。
我的问题是在 python 中ul 的替代品是什么。
【问题讨论】:
-
Python 有无限大(理论上)有符号整数。你想用这个整数做什么?
-
您的意思是问:
My question is what is the equivalent of ul in python? -
@MichaelButscher 我有一个来自 github 的 c++ 程序,我需要在 python 中进行转换,为此我需要这个。这是c++代码 long double a = sqrt(1ul+4*(x))
标签: python math integer long-integer