|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include <math.h>#include "numth/ele_mul.h"#include "impl/inlines.h"#include "impl/longlong.h"#include "mparam.h"#include "impl/prime_table.h"宏定义 | |
| #define | mul_1(dst, rn, v) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
函数 | |
| static uint | count_factors (fac_ptr fac, uint nfactors, uint n, uint r, uint p) |
| mp_size_t | lmmp_nPr_ (mp_ptr restrict dst, mp_bitcnt_t bits, mp_size_t rn, ulong n, ulong r) |
| mp_size_t | lmmp_nPr_size_ (ulong n, ulong r, mp_bitcnt_t *restrict bits) |
| static mp_size_t | lmmp_odd_nPr_product_ (mp_ptr restrict dst, mp_size_t rn, uint n, uint r) |
| 使用累乘函数计算nPr(奇数部分) | |
| mp_size_t | lmmp_odd_nPr_uint_ (mp_ptr restrict dst, mp_size_t rn, ulong n, ulong r) |
| mp_size_t | lmmp_odd_nPr_ulong_ (mp_ptr restrict dst, mp_size_t rn, ulong n, ulong r) |
| mp_size_t | lmmp_odd_nPr_ushort_ (mp_ptr restrict dst, mp_size_t rn, ulong n, ulong r) |
变量 | |
| static const ulong | odd_factorial [25] |
| #define mul_1 | ( | dst, | |
| rn, | |||
| v ) |
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
引用了 _udiv32by32_q_preinv, count_factors(), fac_t::f, fac_t::j, MP_ULONG_MAX , 以及 n.
引用了 LIMB_BITS, lmmp_debug_assert, lmmp_nPr_(), lmmp_odd_nPr_uint_(), lmmp_odd_nPr_ulong_(), lmmp_odd_nPr_ushort_(), lmmp_param_assert, lmmp_shl_(), lmmp_zero, n, NPR_INT_LIMIT, NPR_SHORT_LIMIT , 以及 restrict.
| mp_size_t lmmp_nPr_size_ | ( | ulong | n, |
| ulong | r, | ||
| mp_bitcnt_t *restrict | bits ) |
引用了 LIMB_BITS, lmmp_limb_popcnt_, lmmp_nPr_size_(), lmmp_param_assert, lmmp_pow_1_size_(), MP_UINT_MAX, n, ODD_FACTORIAL_SIZE , 以及 restrict.
使用累乘函数计算nPr(奇数部分)
引用了 ctz_shr_u32, k, lmmp_copy, lmmp_elem_mul_ulong_(), lmmp_odd_nPr_product_(), MP_UINT_MAX, n, restrict, t, TALLOC_TYPE, TEMP_DECL, TEMP_FREE , 以及 tp.
引用了 BALLOC_TYPE, count_factors(), ctz_shr_u64, prime_cache_t::is_end, lmmp_factors_mul_(), lmmp_odd_nPr_product_(), lmmp_odd_nPr_uint_(), lmmp_param_assert, lmmp_prime_cache_free_(), lmmp_prime_cache_init_(), lmmp_prime_cache_next_(), lmmp_prime_int_table_init_(), lmmp_prime_size_(), mul_1, n, NPR_INT_LIMIT, PERMUTATION_UINT_B_THRESHOLD, PERMUTATION_UINT_K_THRESHOLD, prime_cache_t::pp, restrict, prime_cache_t::size, TEMP_B_DECL , 以及 TEMP_B_FREE.
引用了 ctz_shr_u64, k, lmmp_copy, lmmp_elem_mul_ulong_(), lmmp_odd_nPr_ulong_(), lmmp_param_assert, mul_1, n, restrict, TALLOC_TYPE, TEMP_DECL, TEMP_FREE , 以及 tp.
引用了 count_factors(), ctz_shr_u64, lmmp_copy, lmmp_debug_assert, lmmp_elem_mul_ulong_(), lmmp_factors_mul_ushort_(), lmmp_odd_nPr_product_(), lmmp_odd_nPr_ushort_(), lmmp_param_assert, lmmp_prime_cnt16_(), MP_UCHAR_MAX, mul_1, n, NPR_SHORT_LIMIT, odd_factorial, ODD_FACTORIAL_SIZE, PERMUTATION_USHORT_B_THRESHOLD, PERMUTATION_USHORT_K_THRESHOLD, prime_short_table, restrict, SALLOC_TYPE, t, TALLOC_TYPE, TEMP_DECL, TEMP_FREE, TEMP_S_DECL, TEMP_S_FREE , 以及 tp.
|
static |
被这些函数引用 lmmp_odd_nPr_ushort_().