Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2014 09:00:18 +0800
From:      "=?gb18030?B?1cXqzw==?=" <zganghanhan@foxmail.com>
To:        "=?gb18030?B?QW5kcmV5IFpvbm92?=" <zont@FreeBSD.org>
Cc:        =?gb18030?B?ZnJlZWJzZC1uZXQ=?= <freebsd-net@freebsd.org>
Subject:   =?gb18030?B?u9i4tKO6IHBvdyBmdW5jdGlvbiBpbiBrZXJuZWwg?= =?gb18030?B?c3BhY2U=?=
Message-ID:  <tencent_159CA2BC7E46BD14532BB2CA@qq.com>
In-Reply-To: <53A33448.9060909@FreeBSD.org>
References:  <mailman.75.1403092802.14182.freebsd-net@freebsd.org> <tencent_34C23E3A7E7FDFEA644A3392@qq.com> <53A33448.9060909@FreeBSD.org>

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

  
  

 

 ------------------ 原始邮件 ------------------
  发件人: "Andrey Zonov";<zont@FreeBSD.org>;
 发送时间: 2014年6月20日(星期五) 凌晨3:04
 收件人: "张晗"<zganghanhan@foxmail.com>; "freebsd-net"<freebsd-net@freebsd.org>; 
 
 主题: Re: pow function in kernel space

 

There is no floating point types in kernel, so there is no pow() in kernel.

On 6/19/14, 5:40 AM, 张晗 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?
>   
>  Thanks!
>  
>  
>   ------------------
>   
> 祝好,
>  
> 张晗
>  
>  
>  
> ---------- 
>  
> HanZhang
>  


-- 
Andrey Zonov

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?tencent_159CA2BC7E46BD14532BB2CA>