|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
函数 | |
| mp_limb_t | lmmp_div_divide_ (mp_ptr restrict dstq, mp_ptr restrict numa, mp_size_t na, mp_srcptr restrict numb, mp_size_t nb, mp_limb_t inv21) |
| static mp_limb_t | lmmp_div_divide_n_ (mp_ptr restrict dstq, mp_ptr restrict numa, mp_srcptr restrict numb, mp_size_t n, mp_limb_t inv21, mp_ptr restrict tp) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| mp_limb_t lmmp_div_divide_ | ( | mp_ptr restrict | dstq, |
| mp_ptr restrict | numa, | ||
| mp_size_t | na, | ||
| mp_srcptr restrict | numb, | ||
| mp_size_t | nb, | ||
| mp_limb_t | inv21 ) |
在文件 div_divide.c 第 87 行定义.
引用了 LIMB_B_2, lmmp_div_divide_(), lmmp_div_divide_n_(), lmmp_div_s_(), lmmp_param_assert, numb, restrict, TALLOC_TYPE, TEMP_DECL, TEMP_FREE , 以及 tp.
|
static |
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
分治除法
| dstq | 结果商指针([dstq,n]=[numa,2*n] div [numb,n]) |
| numa | 被除数指针([numa,n]=[numa,2*n] mod [numb,n]) |
| numb | 除数指针 |
| n | 除数长度 |
| inv21 | 除数高128位的逆 |
| tp | 临时工作区指针(需要 n 个 limb 的空间) |
在文件 div_divide.c 第 39 行定义.
引用了 DIV_DIVIDE_THRESHOLD, LIMB_B_2, lmmp_add_n_(), lmmp_div_basecase_(), lmmp_div_divide_n_(), lmmp_mul_(), lmmp_param_assert, lmmp_sub_1_(), lmmp_sub_n_(), lo, n, numb, restrict , 以及 tp.
被这些函数引用 lmmp_div_divide_() , 以及 lmmp_div_divide_n_().