Date: Fri, 20 Jun 2014 08:59:49 +0800 From: "=?gb18030?B?1cXqzw==?=" <zganghanhan@foxmail.com> To: "=?gb18030?B?UGV0ZXIgSmVyZW15?=" <peter@rulingia.com> Cc: =?gb18030?B?ZnJlZWJzZC1uZXQ=?= <freebsd-net@freebsd.org> Subject: =?gb18030?B?u9i4tKO6IHBvdyBmdW5jdGlvbiBpbiBrZXJuZWwg?= =?gb18030?B?c3BhY2U=?= Message-ID: <tencent_4624B06535B229A76B4DDDED@qq.com> In-Reply-To: <20140619200625.GB3631@server.rulingia.com> References: <mailman.75.1403092802.14182.freebsd-net@freebsd.org> <tencent_34C23E3A7E7FDFEA644A3392@qq.com> <20140619200625.GB3631@server.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@csnet1.cs.tsinghua.edu.cn ------------------ 原始邮件 ------------------ 发件人: "Peter Jeremy";<peter@rulingia.com>; 发送时间: 2014年6月20日(星期五) 凌晨4:06 收件人: "张晗"<zganghanhan@foxmail.com>; 抄送: "freebsd-net"<freebsd-net@freebsd.org>; 主题: Re: pow function in kernel space On 2014-Jun-19 20:40:48 +0800, 张晗 <zganghanhan@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?tencent_4624B06535B229A76B4DDDED>
