请问,有人可以帮我如何用 C 计算简单的 log2 吗?我尝试使用这段代码,但它不起作用:
printf( "log( %f ) = %f\n", x, log2(x) );
c logarithm
c ×1
logarithm ×1