|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include "impl/inlines.h"#include "impl/longlong.h"#include "mparam.h"#include "impl/tmp_alloc.h"#include "impl/mul_cache.h"#include "lmmp/lmmpn.h"#include "lmmp/numth.h"宏定义 | |
| #define | LMMP_DIVX_PUT(k, qv) |
| #define | prod (tp + dn) |
| #define | rp (tp) |
| #define LMMP_DIVX_PUT | ( | k, | |
| qv ) |
| #define prod (tp + dn) |
| #define rp (tp) |
在文件 divexact.c 第 385 行定义.
引用了 DIVEXACT_BASECASE_THRESHOLD, DIVEXACT_NN_THRESHOLD, lmmp_binvert_2_(), lmmp_binvert_ulong_(), lmmp_copy, lmmp_divexact_(), lmmp_divexact_1_(), lmmp_divexact_2_(), lmmp_divexact_basecase_(), lmmp_divexact_divide_(), lmmp_divexact_unbalance_(), lmmp_param_assert, restrict, TALLOC_TYPE, TEMP_DECL, TEMP_FREE , 以及 tp.
Copyright (C) 2026 HJimmyK (Jericho Knox)
精确除法([dst,nn]=[np,nn]/d,且余数必须为0)
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)
| dst | 结果指针(长度为 nn 个limb) |
| np | 被除数指针(长度为 nn 个limb) |
| nn | 被除数的 limb 长度 |
| d | 除数 |
| dinv | 除数的逆元(d*dinv==1 mod 2^64) |
在文件 divexact.c 第 32 行定义.
引用了 _umul64to128_(), lmmp_debug_assert, lmmp_divexact_1_(), lmmp_param_assert, lo , 以及 s.
被这些函数引用 lmmp_binvert_(), lmmp_divexact_(), lmmp_divexact_1_(), lmmp_divexact_basecase_() , 以及 TEST_CASE().
| void lmmp_divexact_2_ | ( | mp_ptr | dst, |
| mp_srcptr | np, | ||
| mp_size_t | nn, | ||
| mp_srcptr restrict | dp, | ||
| mp_srcptr restrict | dinv ) |
在文件 divexact.c 第 57 行定义.
引用了 _umul128to128_(), _umul128to256_(), lmmp_divexact_2_(), lmmp_param_assert, restrict, s , 以及 t.
| void lmmp_divexact_basecase_ | ( | mp_ptr | dst, |
| mp_ptr | np, | ||
| mp_size_t | nn, | ||
| mp_srcptr restrict | dp, | ||
| mp_size_t | dn ) |
在文件 divexact.c 第 268 行定义.
引用了 _umul64to128_(), _umul64to64hi_(), D, lmmp_addmul_1_(), lmmp_addmul_2_(), lmmp_binvert_ulong_(), lmmp_debug_assert, lmmp_divexact_1_(), lmmp_divexact_basecase_(), LMMP_DIVX_PUT, lmmp_param_assert, lmmp_zero, restrict, s , 以及 t.
| void lmmp_divexact_divide_ | ( | mp_ptr restrict | dst, |
| mp_srcptr restrict | np, | ||
| mp_size_t | nn, | ||
| mp_srcptr restrict | dp, | ||
| mp_size_t | dn ) |
在文件 divexact.c 第 355 行定义.
引用了 lmmp_binvert_n_dc_(), lmmp_debug_assert, lmmp_divexact_divide_(), lmmp_mul_(), lmmp_mullo_n_(), lmmp_param_assert, lmmp_sub_n_(), restrict, TALLOC_TYPE, TEMP_DECL, TEMP_FREE , 以及 tp.
|
static |
在文件 divexact.c 第 124 行定义.
引用了 DIVEXACT_MERSENNE_CACHE_THRESHOLD, DIVEXACT_MERSENNE_THRESHOLD, lmmp_copy, lmmp_divexact_mu_run_(), lmmp_fft_gr_cache_free_(), lmmp_fft_next_size_(), lmmp_inc, lmmp_mersenne_next_size_(), lmmp_mul_(), lmmp_mul_mersenne_(), lmmp_mul_mersenne_cache_(), lmmp_mul_mersenne_cache_init_(), lmmp_mullo_cache_free_(), lmmp_mullo_fft_cache_(), lmmp_mullo_fft_cache_init_(), lmmp_mullo_n_(), lmmp_sub_n_(), lmmp_sub_nc_(), MULLO_DC_THRESHOLD, prod, restrict, rp , 以及 tp.
被这些函数引用 lmmp_divexact_mu_run_() , 以及 lmmp_divexact_unbalance_().
| void lmmp_divexact_unbalance_ | ( | mp_ptr | dst, |
| mp_srcptr | np, | ||
| mp_size_t | nn, | ||
| mp_srcptr restrict | dp, | ||
| mp_size_t | dn, | ||
| mp_ptr restrict | dinv ) |
在文件 divexact.c 第 225 行定义.
引用了 lmmp_binvert_n_dc_(), lmmp_copy, lmmp_divexact_mu_run_(), lmmp_divexact_unbalance_(), lmmp_mullo_n_(), lmmp_param_assert, restrict, TALLOC_TYPE, TEMP_DECL, TEMP_FREE , 以及 tp.
|
inlinestatic |
在文件 divexact.c 第 110 行定义.
引用了 lmmp_mullo_dc_(), lmmp_mullo_fft_(), lmmp_mullo_n_(), MULLO_DC_THRESHOLD, n, numb, restrict , 以及 tp.