|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include "impl/inlines.h"#include "impl/longlong.h"#include "impl/prime_table.h"#include "impl/trialdiv.h"#include "lmmp/numth.h"#include "mparam.h"#include "numth/is_prime.h"函数 | |
| bool | lmmp_is_prime_uint_ (uint n) |
| 判断素数 | |
| bool | lmmp_is_prime_uint_notrial_ (uint n) |
| u32 档双基底强伪素数内核(基底 2 + dj_base49 哈希基底,普通域免蒙域算术) | |
| static void | powmod2b_u32 (uint b, uint d, int ebits, uint n, ulong dinv, uint *py2, uint *pyb) |
| static int | sprp_check_u32 (uint y, ulong t, uint n, ulong dinv) |
| static ulong | urem32_preinv (ulong t, ulong n, ulong dinv) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| bool lmmp_is_prime_uint_ | ( | uint | n | ) |
判断素数
| n | 待判断的数 |
在文件 is_prime_uint.c 第 124 行定义.
引用了 lmmp_is_prime_table_(), lmmp_is_prime_uint_(), lmmp_is_prime_uint_notrial_(), n , 以及 trial_div35711().
被这些函数引用 lmmp_is_prime_uint_(), lmmp_powmod_(), TEST_CASE() , 以及 TEST_CASE().
| bool lmmp_is_prime_uint_notrial_ | ( | uint | n | ) |
u32 档双基底强伪素数内核(基底 2 + dj_base49 哈希基底,普通域免蒙域算术)
| n | 待判断的数 |
在文件 is_prime_uint.c 第 98 行定义.
引用了 ctz_shr_u64, dj_base49, lmmp_is_prime_uint_notrial_(), lmmp_limb_bits_, LMMP_NOINLINE, lmmp_param_assert, MP_ULONG_MAX, n, powmod2b_u32(), sprp_check_u32() , 以及 t.
被这些函数引用 lmmp_is_prime_uint_(), lmmp_is_prime_uint_notrial_() , 以及 lmmp_is_prime_ulong_notrial_().
在文件 is_prime_uint.c 第 39 行定义.
引用了 k, n, powmod2b_u32() , 以及 urem32_preinv().
被这些函数引用 lmmp_is_prime_uint_notrial_() , 以及 powmod2b_u32().
在文件 is_prime_uint.c 第 85 行定义.
引用了 n, sprp_check_u32(), t , 以及 urem32_preinv().
被这些函数引用 lmmp_is_prime_uint_notrial_() , 以及 sprp_check_u32().
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
在文件 is_prime_uint.c 第 32 行定义.
引用了 _umul64to64hi_(), n, t , 以及 urem32_preinv().
被这些函数引用 powmod2b_u32(), sprp_check_u32() , 以及 urem32_preinv().