C中如何实现ln(x)?
#include <math.h> float log (float val);
log(x)是以10为底的啊
晕。你看过帮助没?| Description: The log function calculates the natural logarithm for the floating-point number val. The natural logarithm uses the base e or 2.718282…[/QUOTE] [QUOTE]Description: The log10 function calculates the common logarithm for the floating-point number val. The common logarithm uses base 10. |