在浮点执行POW()函数的最有效的方法 [英] The most efficient way of implementing pow() function in floating point

查看:146
本文介绍了在浮点执行POW()函数的最有效的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现我自己的战俘的版本()和SQRT()函数作为我的自定义库没有POW()/的sqrt()浮点支持。

I am trying to implement my own version of pow() and sqrt() function as my custom library doesn't have pow()/sqrt() floating point support.

谁能帮助?

推荐答案

是,Sun公司可以(现在Oracle,我猜):

Yes, Sun can (Oracle now, I guess):

fdlibm 的自由发布的数学库,拥有的开方战俘,连同许多其他的数学函数。

fdlibm, the "freely distributable math library", has sqrt and pow, along with many other math functions.

他们是相当高科技的实现,不过,当然没有什么是有史以来最高效实施这样的事情。你是在追求源$ C ​​$ C来完成它,或者是你真的没有那么多寻找 POW 开方,但实际上寻找浮点教育算法编程?

They're fairly high-tech implementations, though, and of course nothing is ever the "most efficient" implementation of something like this. Are you after source code to get it done, or are you really not so much looking for pow and sqrt, but actually looking for an education in floating-point algorithms programming?

这篇关于在浮点执行POW()函数的最有效的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆