什么开三次方你还在用pow
不会真有人不知道cbrt
#include<stdio.h>
#include<math.h>
using namespace std;
int main()
{
double a=8;
a=cbrt(a);
printf("%lf",a);
}
用pow(8,1.0/3);
其实是有问题的,有精度损失
一些时候可能会答案错误
让你红艳艳
cbrt是前不久一老铁分享的,感谢老铁yxy
什么开三次方你还在用pow
不会真有人不知道cbrt
#include<stdio.h>
#include<math.h>
using namespace std;
int main()
{
double a=8;
a=cbrt(a);
printf("%lf",a);
}
用pow(8,1.0/3);
其实是有问题的,有精度损失
一些时候可能会答案错误
让你红艳艳
cbrt是前不久一老铁分享的,感谢老铁yxy