【问题标题】:Which library has power function? [closed]哪个库有电源功能? [关闭]
【发布时间】:2015-12-04 14:51:52
【问题描述】:

我是初学者 c 程序员...我想在我的程序中使用 power 函数,但是我没有找到任何具有 power 函数的库? 请给我介绍一个有这个功能的库

【问题讨论】:

  • 什么幂函数?就像数学取幂一样? 2^3 -> 8?
  • 通过数学库中的幂函数你可以做到..但是在问这样的问题之前请先搜索一下
  • @amingholami 非常感谢......

标签: c function


【解决方案1】:
#include <math.h>

double pow(double x, double y);
float powf(float x, float y);
long double powl(long double x, long double y);

【讨论】:

    【解决方案2】:
    #include <math.h>
    double pow(double x, double y); // where x is the base, y is the exp
    

    【讨论】:

      猜你喜欢
      • 2021-11-02
      • 2010-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-02
      • 1970-01-01
      • 2023-03-26
      • 1970-01-01
      相关资源
      最近更新 更多