2025-09-10:仓库迁移

This commit is contained in:
2025-09-10 16:12:45 +08:00
parent e0e49b0ac9
commit 3130e336a1
146 changed files with 4066 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import math
if __name__ == '__main__':
# python没有原生的东西来表示这些值但他们可以被创建
a = float('inf')
b = float('-inf')
c = float('nan')
print(a, b, c)
# 如果想要感知这些值请使用isnan或isinf函数
print(math.isnan(c))
print(math.isinf(a))
# 要尤其注意inf在计算中会被传播
print(a+45)
# 但是一些神奇操作会产生nan比如
print(a + b)
print(a / a)
# 尤其注意nan会在所有的操作中传播且不会引起任何报错请务必在计算前进行使用isnan函数进行安全检测