|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
函数 | |
| static int | ctz_u128 (mp_limb_t lo, mp_limb_t hi) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| mp_size_t | lmmp_gcd_22_ (mp_ptr dst, mp_srcptr up, mp_srcptr vp) |
| 计算两个无符号整数的最大公约数 | |
| mp_size_t | lmmp_gcd_2_ (mp_ptr dst, mp_srcptr up, mp_size_t un, mp_srcptr vp) |
| 计算两个无符号整数的最大公约数 | |
| static void | lshl_u128 (mp_limb_t *lo, mp_limb_t *hi, int k) |
| static void | lshr_u128 (mp_limb_t *lo, mp_limb_t *hi, int k) |
Copyright (C) 2026 HJimmyK (Jericho Knox)
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
128 位尾零数
引用了 ctz_u128(), lmmp_tailing_zeros_ , 以及 lo.
被这些函数引用 ctz_u128() , 以及 lmmp_gcd_22_().
计算两个无符号整数的最大公约数
| up | 第一个无符号整数指针,长度为 2 |
| vp | 第二个无符号整数指针,长度为 2 |
| dst | 结果指针(长度为 2,两个 limb 都会进行写入,即使最高位可能为0) |
引用了 ctz_u128(), lmmp_gcd_11_(), lmmp_gcd_22_(), lmmp_param_assert, lmmp_tailing_zeros_, lshl_u128(), lshr_u128(), t, v0, v1 , 以及 w0.
被这些函数引用 lmmp_divexact_(), lmmp_gcd_(), lmmp_gcd_22_(), lmmp_gcd_2_(), TEST_CASE() , 以及 TEST_CASE().
计算两个无符号整数的最大公约数
| up | 第一个无符号整数指针 |
| un | 第一个无符号整数的 limb 长度 |
| vp | 第二个无符号整数指针,长度为 2 |
| dst | 结果指针(长度至少为 2,两个 limb 都会进行写入,即使最高位可能为0) |
引用了 lmmp_gcd_22_(), lmmp_gcd_2_(), lmmp_mod_2_() , 以及 lmmp_param_assert.
被这些函数引用 lmmp_divexact_(), lmmp_gcd_(), lmmp_gcd_2_(), TEST_CASE(), TEST_CASE() , 以及 TEST_CASE().