如何在 iOS 中计算对数?
我想在 iOS 中计算对数。 Objective-C 可以做到这一点吗?
I want to calculate a logarithm in iOS. Can Objective-C do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我想在 iOS 中计算对数。 Objective-C 可以做到这一点吗?
I want to calculate a logarithm in iOS. Can Objective-C do this?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
您可以使用 C 函数 计算对数
您还可以请参阅此处:什么样的对数函数/方法在 Objective-C / Cocoa-touch 中可用吗?
You can use the C functions for calculating logarithms
You can also see here: What kind of logarithm functions / methods are available in objective-c / cocoa-touch?
我们可以使用 C 中可用的相同数学函数在 Objective-C 中进行数学运算。
我使用以下函数进行数学运算。这里这些函数的返回类型是 double 并且参数也应该是 double 类型......所以
We can use the same math functions which are available in C to do math operations in Objective-C.
I have used the following functions to do mathematical operations. Here the return type of these functions is double and argument should also be of double type... so
是的。
Objective C 是 ANSI C 的超集,iOS 支持使用大多数常用的 C 库。
因此,您可以使用 C 库 math.h,其中包括多个对数函数(base10、base e、float result、double result 等)
Yes.
Objective C is a superset of ANSI C, and iOS supports using most of the usual C libraries.
Thus, you can use the C library math.h, which include several log functions (base10, base e, float result, double result, etc.)