Square Root for Bigint in F#

妖精的绣舞 提交于 2019-12-10 14:19:39

问题


Is there a way to get the square root of a big integer? I am dealing with numbers that are much too large for int64 to handle so bigint is a must.

I was considering the idea of implementing it myself using the Babylonian method, but want to know if there are any built in functions for this first.

Thanks in advance.


回答1:


You can use newton's method on any scalar.

http://en.wikipedia.org/wiki/Newton%27s_method

-- MarkusQ

P.S. See also http://en.wikipedia.org/wiki/Methods_of_computing_square_roots




回答2:


Happy Square Root Day to you too :).

I don't think there is built-in in bigint



来源:https://stackoverflow.com/questions/608514/square-root-for-bigint-in-f

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!