导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→C中如何实现ln(x)?[freebigfish]

 *第36602篇: C中如何实现ln(x)?

  
楼 主:freebigfish 2005年12月21日10:11
 C中如何实现ln(x)?
各位大侠,C中如何实现ln(x)?请不吝赐教!谢谢!
  
2楼:lenglianxi 2005年12月22日16:49
 #include <math.h> float log (float val);
如题
  
3楼:freebigfish 2005年12月23日10:54
 log(x)是以10为底的啊
首先谢谢你! log(x)是以10为底的啊,我原先也这么想的,可是ln(x)是以e为底的.
  
4楼:lenglianxi 2005年12月23日10:58
 晕。你看过帮助没?
log()是以e为底,
log10()是以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.


>>>>>>对该主题发表你的看法

本主题贴数4,分页: [第1页]


[上一篇主题]:请问,有什么电路能保证直插的单片机插反以后不被烧毁?

[下一篇主题]:请问谁有BA5104芯片的资料?我在网上找不到