小编Gab*_*el 的帖子

价值达到无穷大太快了,我该如何阻止这种情况发生?(如何让程序存储更大的数字?)

到目前为止,这是我的代码:

let x = tgamma(a+b)
let y = tgamma(a)
let z = tgamma(b)

let norm = x / (y*z)

Run Code Online (Sandbox Code Playgroud)

“x”的类型是浮点型。我的代码中的问题是 x 达到无穷大太快。我想知道是否有办法让程序为“x”存储更高的值。那可能吗?

floating-point infinity swift

0
推荐指数
1
解决办法
76
查看次数

标签 统计

floating-point ×1

infinity ×1

swift ×1