gpt4 book ai didi

f# - F# 中 Bigint 的平方根

转载 作者:行者123 更新时间:2023-12-04 21:27:48 26 4
gpt4 key购买 nike

有没有办法得到一个大整数的平方根?我正在处理对于 int64 来说太大而无法处理的数字,因此必须使用 bigint。

我正在考虑使用巴比伦方法自己实现它的想法,但首先想知道是否有任何内置函数。

提前致谢。

最佳答案

您可以对任何标量使用牛顿法。

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

——马库斯Q

附言另见 http://en.wikipedia.org/wiki/Methods_of_computing_square_roots

关于f# - F# 中 Bigint 的平方根,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/608514/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com