如何:POW(真实的,真实)的86 [英] How to: pow(real, real) in x86

查看:224
本文介绍了如何:POW(真实的,真实)的86的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找 POW(真实的,真实)的x86汇编的实现。此外,我想了解的算法是如何工作的。

I'm searching for the implementation of pow(real, real) in x86 assembler. Also I'd like to understand how the algorithm works.

推荐答案

就计算为 2 ^(Y * LOG2(X))

有一个x86指令FYL2X计算Y * LOG2(x)和x86指令F2XM1做求幂。 F2XM1要求[-1,1]范围内的参数,所以你必须要加一些code之间提取整数部分,其余部分,exponentiate其余,使用FSCALE通过适当的电源规模的结果2。

There is a x86 instruction FYL2X to compute y*log2(x) and a x86 instruction F2XM1 to do exponentiation. F2XM1 requires an argument in [-1,1] range, so you'd have to add some code in between to extract the integer part and the remainder, exponentiate the remainder, use FSCALE to scale the result by an appropriate power of 2.

这篇关于如何:POW(真实的,真实)的86的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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