运行 ❯
获取您
自己的
网站
×
更换方向
更换主题,深/浅
前往 Spaces
#include <iostream> #include <cmath> using namespace std; int main() { const double E = 2.718281828; cout << log(6.0f) << "\n"; cout << log(E) << "\n"; cout << log(2.0) << "\n"; cout << log(1.0) << "\n"; cout << log(0.0) << "\n"; cout << log(-1.0f) << "\n"; return 0; }
1.79176
1
0.693147
0
-inf
-nan