gpt4 book ai didi

python - 非常大的数字的最大精度

转载 作者:行者123 更新时间:2023-11-30 23:28:20 29 4
gpt4 key购买 nike

当我尝试除 696 252/17 500 423 时,我总是得到 0.0。有没有办法提高这种划分的精度?

最佳答案

使用 float 将任一数字转换为 float 函数,像这样

print float(696252) / 17500423  # 0.0397848669144

关于python - 非常大的数字的最大精度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21668558/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com