打印任意数量的浮点数

tek*_*agi 1 python algorithm floating-point newtons-method square-root

如何float在python中打印超过10位数的数字?现在,什么时候做

print sqr_newton(10, 3, 0.001) (其中sqr_newton是newton的平方根算法;返回一个浮点数)

它只在小数位后给出这么多数字......我怎样才能得到更多?

Den*_*nis 5

这是python中浮点数的标准精度.

对于任意精度,您可以使用bigfloat包.