回复: pow function in kernel space
张晗
zganghanhan at foxmail.com
Fri Jun 20 01:00:00 UTC 2014
Hi:
I am doing a research on D2TCP(http://dl.acm.org/citation.cfm?id=2342388), I just want to implement it into the linux kernel. When calculating the penalty function, it is p = a^d, where 0< a < 1 and 0< d < 1. Since the kernel only offers integer, so in my code, so I let a multiply 2^10. But I have no idea of calculating a^d when 0< d < 1. May be I want a approximate algorithm or other methods. Can you help me ?
thanks~
------------------
祝好,
张晗
----------
HanZhang
School of Computer Science
Tsinghua University, Beijing, 100084, P.R.CHINA
Mobile: +86 156-526-59782
E-mail: zhanghan at csnet1.cs.tsinghua.edu.cn
------------------ 原始邮件 ------------------
发件人: "Peter Jeremy";<peter at rulingia.com>;
发送时间: 2014年6月20日(星期五) 凌晨4:06
收件人: "张晗"<zganghanhan at foxmail.com>;
抄送: "freebsd-net"<freebsd-net at freebsd.org>;
主题: Re: pow function in kernel space
On 2014-Jun-19 20:40:48 +0800, 张晗 <zganghanhan at foxmail.com> wrote:
>how can I implement, in an efficient, way the pow() function in kernel space ? Is there any function I can use o r how I can evaluate pow function in kernel model?
Since the kernel only offers integer arithmetic, one approach would be
square and multiply. What are you trying to do? Maybe we can offer
an alternative to pow(3).
--
Peter Jeremy
More information about the freebsd-net
mailing list