首先,我想提一下,我在编程和数学方面都是新手。有人可以解释一下为什么结果不是0?
variable_1 = 360*2305567963945518424753102147331756070
variable_2 = variable_1/1
variable_3 = variable_2 % 360
result => 72.0
答案 0 :(得分:0)
你需要十进制模块来将科学否转换为否
* *的第一个输出太大,因此转换为科学否
import decimal
variable_1 = 360*2305567963945518424753102147331756070
print variable_1
variable_1 = decimal.Decimal(variable_1)
print variable_1
variable_3 = variable_1 / 360
print variable_3
for%use long
variable_3 = long(variable_1) % 360