小编Fel*_*pes的帖子

如何查看数字是否以.0结尾

如果数字以.0结尾,我正在尝试运行测试

I am running a program with numbers orders of magnitude apart so I can't estimate to a certain amount of digits. using % doesn't work either because then certain numbers are excluded. All the numbers in this program are floating point numbers so I need a way to check if it ends with .0, not with .00000000000001232 or something it has to end exactly in .0

The problem with the round function is that I am dealing with numbers …

python floating-point integer decimal rounding

2
推荐指数
1
解决办法
3448
查看次数

标签 统计

decimal ×1

floating-point ×1

integer ×1

python ×1

rounding ×1