如何使用位操作来做\sqrt(n) [英] how to use bit operation to do \sqrt(n)
问题描述
大家好,
n是一个32位整数,如何计算
sqrt(n)
我知道高(n)是该值,但如何使用位操作来实现此功能。
提前感谢。
你的
尹
hello all,
n is an 32bit-integer, how to calculate
sqrt(n)
I know high(n) is the the value, but how to use bit operation to
implement this function.
thanks in advance.
yours
Yin
推荐答案
Thomas Zhu写道:
Thomas Zhu wrote:
n是一个32位整数,如何计算
sqrt(n)
我知道高(n)是该值,但如何使用位操作到
实现此功能。
n is an 32bit-integer, how to calculate
sqrt(n)
I know high(n) is the the value, but how to use bit operation to
implement this function.
http://www.pobox.com /~qed/sqroot.html
-
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
http://www.pobox.com/~qed/sqroot.html
--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
Thomas Zhu写道:
Thomas Zhu wrote:
你好所有,
n是一个32位整数,如何计算
sqrt(n)
我知道高(n)是该值,但如何使用位操作来实现此功能。
提前感谢。
你的
Yin
hello all,
n is an 32bit-integer, how to calculate
sqrt(n)
I know high(n) is the the value, but how to use bit operation to
implement this function.
thanks in advance.
yours
Yin
你指的是sqrt(n)的定点实现
什么是高(n)?
再见,>
快点。
are you referring to fixed point implementation of sqrt(n)
what is high(n)?
bye,
hurry.
快点w死记硬背:
hurry wrote:
你指的是sqrt(n)的定点实现
什么是高(n)?
are you referring to fixed point implementation of sqrt(n)
what is high(n)?
如果n表示为二进制字符串,前半部分是sqrt(n),
是高(n)
if n is represented as a binary string, the first half is the sqrt(n),
which is high(n)
这篇关于如何使用位操作来做\sqrt(n)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!