一个C++可以指定基础的日志的实现?
我最近一直在玩一些数学,我想知道是否有人编写/见过可以为其指定基数(根..?)的日志的 C++ 实现?如:
数学函数定义 http://i1091.photobucket.com/albums/ i383/dannydeth1/forumla.png
显然我更喜欢将基数作为参数: double d =日志(b,x);
感谢您的宝贵时间,非常感谢您的回答。 :}
编辑:另外,我认为它会使用泰勒级数?
I've been playing around with some math recently and I would like to know if anyone has written/seen a C++ implementation of log that one can specify the base (root..?) for? As in:
Mathematical function definition http://i1091.photobucket.com/albums/i383/dannydeth1/forumla.png
Obviously I would prefer giving the base as an argument: double d = log(b,x);
Thank you for your time and any answers are much appreciated. :}
EDIT: Also, I take it would use Taylor Series?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
log_b_(x) = log(x) / log(b)。只需这样做:
log_b_(x) = log(x) / log(b). Just do this:
自己实现起来很简单:
它通常有用吗?或者几乎所有用途都包含在
log
、log10
和log2
中?It's straightforward to implement yourself:
Is it generally useful? Or are practically all of the uses subsumed by
log
,log10
andlog2
?