F#中Bigint的平方根 [英] Square Root for Bigint in F#

查看:51
本文介绍了F#中Bigint的平方根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法获取大整数的平方根?我要处理的数字太大,int64无法处理,因此bigint是必须的.

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.

谢谢.

推荐答案

您可以在任何标量上使用牛顿法.

You can use newton's method on any scalar.

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

-MarkusQ

P.S.另请参见 http://en.wikipedia.org/wiki/Methods_of_computing_square_roots

这篇关于F#中Bigint的平方根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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