时间复杂度的c ++数学库pow()函数? [英] Time complexity of c++ math library pow() function?

查看:2135
本文介绍了时间复杂度的c ++数学库pow()函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在c ++中构建的pow()函数的最坏情况下的时间复杂性是什么?

I wanted to know what is the worst case time-complexity of the pow() function that's built in c++?

推荐答案

这取决于底层架构。在最常见的桌面体系结构x86上,这是一个常量时间操作。

That depends on the underlying architecture. On the most common desktop architecture, x86, this is a constant time operation.

有关如何在x86上实现的详细信息,请参阅此问题:如何:在x86中使用pow(real,real)

See this question for more details on how it could be implemented on x86: How to: pow(real, real) in x86

这篇关于时间复杂度的c ++数学库pow()函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆