ios - 在 iOS 上计算小数的阶乘(即 Gamma 函数)

标签 ios math ios7

我需要在 iOS 上计算十进制数的阶乘,例如 6.4。我试过了

double myFactorial = gamma(6.4);

但收到错误“'gamma 不可用':在 iOS 上不可用”。有没有办法在iOS中添加gamma函数?

最佳答案

你尝试过吗:

tgamma(6.4)

我看到它在我的代码中工作。

还有:

double tgamma (double x)
float tgammaf (float x)
long double tgammal (long double x)

关于ios - 在 iOS 上计算小数的阶乘(即 Gamma 函数),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19162066/

相关文章:

ios - UITableViewCell 选择背景颜色更改不起作用

ios - Flutter pod 安装问题和 ios 应用程序未运行

iphone - Xcode 5 和 iOS 7 : Architecture and Valid architectures

ios - 无法加载4S拍摄的图像,但可以加载5S

ios - 如何在 applicationDidEnterBackground 中停止 UIDynamicAnimator

ios - UIImageView 溢出 Collection View 单元格

ios - 文本阴影 - iOS,swift 3.0

math - 生成数学方程图像文件的在线工具

c# - 4个圆的交点

javascript - 改进 slider 的鼠标滚轮算法导航