Determining Floating Point Square Root

后端 未结 4 1712
无人共我
无人共我 2021-01-05 05:46

How do I determine the square root of a floating point number? Is the Newton-Raphson method a good way? I have no hardware square root either. I also have no hardware divide

4条回答
  •  抹茶落季
    2021-01-05 06:10

    Probably (still) the fastest implementation for finding the inverse square root and the 10 lines of code that I adore the most.

    It's based on Newton Approximation, but with a few quirks. There's even a great story around this.

提交回复
热议问题