开发者

Problem in getting 100 th power of any particluar value

开发者 https://www.devze.com 2023-03-15 01:30 出处:网络
Suppose i need 100 power of say 1.5 then how can i get that . Any formula how to get this in iphone .For example i need the value of 1.5^100 , then how can i get that in objective c开发者_开发技巧.Us

Suppose i need 100 power of say 1.5 then how can i get that .

Any formula how to get this in iphone .For example i need the value of 1.5^100 , then how can i get that in objective c开发者_开发技巧.


Use the pow() function from math.h:

NSLog(@"%.f", pow(1.5,100) );

If you need any other math related operations, I would check out:

Objective-C Math functions

0

精彩评论

暂无评论...
验证码 换一张
取 消