|
LAMMP 4.2.0
Lamina High-Precision Arithmetic Library
|
#include "../../../include/lammp/impl/longlong.h"#include "../../../include/lammp/lmmpn.h"#include "../../../include/lammp/numth.h"
gcd_2.c 的引用(Include)关系图:函数 | |
| mp_size_t | lmmp_gcd_22_ (mp_ptr dst, mp_srcptr up, mp_srcptr vp) |
| Copyright (C) 2026 HJimmyK(Jericho Knox) | |
| mp_size_t | lmmp_gcd_2_ (mp_ptr dst, mp_srcptr up, mp_size_t un, mp_srcptr vp) |
| 计算两个无符号整数的最大公约数 | |
Copyright (C) 2026 HJimmyK(Jericho Knox)
计算两个无符号整数的最大公约数
This file is part of LAMMP.
LAMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed WITHOUT ANY WARRANTY.
See https://www.gnu.org/licenses/.
引用了 _u128cmp, _u128lshl, _u128lshr, _u128sub, _u128sub64, k, lmmp_gcd_11_(), lmmp_param_assert, lmmp_tailing_zeros_ , 以及 n.
被这些函数引用 lmmp_gcd_2_().
函数调用图:
这是这个函数的调用关系图:计算两个无符号整数的最大公约数
| up | 第一个无符号整数指针 |
| un | 第一个无符号整数的 limb 长度 |
| vp | 第二个无符号整数指针,长度为 2 |
| dst | 结果指针(长度至少为 2,两个 limb 都会进行写入,即使最高位可能为0) |
引用了 lmmp_gcd_22_(), lmmp_mod_2_(), lmmp_param_assert , 以及 n.
函数调用图: