我正在使用 c 做一个项目,在做一些计算时遇到了问题..实际上我想以任何数据类型存储一个大数字(2^52)
int helper = TwoOf(26);//52 over 2
unsigned long long help = helper * helper;
- function Twoof(x) -> calculates x^2
I used long long to store 2^52 but the debugger shows it has a zero value.
有人可以帮忙吗?
最佳答案
如果您不需要个位数的精度并且对有效数字的数量感到满意,请使用 double
关于c - 在 C 数据类型中保存 (2^52) 个数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49767265/