|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include <math.h>#include "impl/inlines.h"#include "impl/longlong.h"#include "mparam.h"#include "lmmp/numth.h"函数 | |
| mp_limb_t | lmmp_sqrt_1_ (mp_ptr dstr, mp_limb_t x) |
| 计算算术平方根 floor(sqrt(x)) | |
| mp_limb_t | lmmp_sqrt_2_ (mp_ptr dstr, mp_srcptr numa) |
| 计算算术平方根 floor(sqrt([numa,2])) | |
| void | lmmp_sqrt_3_ (mp_ptr dsts, mp_ptr dstr, mp_srcptr numa) |
| 计算算术平方根 floor(sqrt([numa,3])) | |
| void | lmmp_sqrt_4_ (mp_ptr dsts, mp_ptr dstr, mp_srcptr numa) |
| 计算算术平方根 floor(sqrt([numa,4])) | |
| ulong | lmmp_sqrt_ulong_ (ulong a) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
计算算术平方根 floor(sqrt(x))
| dstr | 余数指针(1个limb) |
| x | 被开方数 |
引用了 LIMB_B_4, lmmp_param_assert, lmmp_sqrt_1_(), lmmp_sqrt_ulong_() , 以及 s.
被这些函数引用 lmmp_remove_(), lmmp_sqrt_(), lmmp_sqrt_1_(), lmmp_sqrt_2_() , 以及 TEST_CASE().
计算算术平方根 floor(sqrt([numa,2]))
| dstr | 余数指针(2个limb) |
| numa | 被开方数指针 |
引用了 LIMB_B_4, lmmp_param_assert, lmmp_sqrt_1_(), lmmp_sqrt_2_() , 以及 s.
被这些函数引用 is_square_2(), lmmp_remove_(), lmmp_sqrt_(), lmmp_sqrt_2_(), lmmp_sqrt_3_(), lmmp_sqrt_4_(), lmmp_sqrt_divide_() , 以及 TEST_CASE().
计算算术平方根 floor(sqrt([numa,3]))
| dsts | 结果指针(2个limb) |
| dstr | 余数指针(3个limb,最高位补零),传 NULL 表示不计算余数 |
| numa | 被开方数指针 |
引用了 _add_ssaaaa, _sub_ddmmss, _udiv128by64to64_(), a0, LIMB_B_4, LIMB_BITS, lmmp_mullh_, lmmp_param_assert, lmmp_sqrt_2_(), lmmp_sqrt_3_(), r0 , 以及 r1.
被这些函数引用 lmmp_remove_(), lmmp_sqrt_(), lmmp_sqrt_3_() , 以及 TEST_CASE().
计算算术平方根 floor(sqrt([numa,4]))
| dsts | 结果指针(2个limb) |
| dstr | 余数指针(3个limb),传 NULL 表示不计算余数 |
| numa | 被开方数指针 |
引用了 _add_ssaaaa, _sub_ddmmss, _udiv128by64to64_(), LIMB_B_4, LIMB_BITS, lmmp_mullh_, lmmp_param_assert, lmmp_sqrt_2_(), lmmp_sqrt_4_(), r0, r1, r2 , 以及 t.
被这些函数引用 lmmp_remove_(), lmmp_sqrt_(), lmmp_sqrt_4_(), lmmp_sqrt_divide_() , 以及 TEST_CASE().
Copyright (C) 2026 HJimmyK (Jericho Knox)
计算算术平方根 floor(sqrt(a))
This file is part of LMMP.
LMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see https://www.gnu.org/licenses/.
SPDX-License-Identifier: LGPL-3.0-or-later
Copyright (C) 2026 HJimmyK (Jericho Knox)
| a | 被开方数 |
引用了 lmmp_sqrt_ulong_().
被这些函数引用 lmmp_nthroot_ulong_(), lmmp_remove_(), lmmp_sqrt_1_(), lmmp_sqrt_ulong_(), TEST_CASE() , 以及 TEST_CASE().