|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include <stdbool.h>#include <string.h>#include "lmmp/lmmp.h"#include "lmmp/lmmpn.h"#include "lmmp/numth.h"类型定义 | |
| typedef uint | u32 |
| typedef mp_limb_t | u64 |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
函数 | |
| static u64 | add_small_inplace (mp_ptr p, size_t n, u64 v) |
| static u64 | addmod32 (u64 a, u64 b, u64 m) |
| static mp_ptr | alloc_limbs (size_t n) |
| static mp_size_t | chain_mul_small (mp_ptr e, mp_size_t en, u64 v, size_t cap) |
| static bool | divides_all (const mp_limb_t *d, mp_size_t dn, const mp_limb_t *p, mp_size_t pn) |
| static mp_size_t | fib_pair (mp_ptr x, mp_ptr y, mp_size_t buf, mp_size_t want_n) |
| static bool | is_prime_small (u32 n) |
| static u64 | mod32 (const mp_limb_t *p, mp_size_t n, u32 m) |
| static bool | mod_eq (const mp_limb_t *a, mp_size_t an, const mp_limb_t *b, mp_size_t bn) |
| static bool | mod_is_diff (const mp_limb_t *r, mp_size_t rn, const mp_limb_t *a, mp_size_t an, const mp_limb_t *b, mp_size_t bn) |
| static bool | mod_is_product (const mp_limb_t *r, mp_size_t rn, const mp_limb_t *a, mp_size_t an, const mp_limb_t *b, mp_size_t bn) |
| static bool | mod_is_sum (const mp_limb_t *r, mp_size_t rn, const mp_limb_t *a, mp_size_t an, const mp_limb_t *b, mp_size_t bn) |
| static int | mpn_cmp (const mp_limb_t *a, mp_size_t an, const mp_limb_t *b, mp_size_t bn) |
| static bool | mpn_eq (const mp_limb_t *a, mp_size_t an, const mp_limb_t *b, mp_size_t bn) |
| static void | mul_sorted (mp_ptr dst, const mp_limb_t *a, mp_size_t la, const mp_limb_t *b, mp_size_t lb) |
| static u64 | mulmod32 (u64 a, u64 b, u64 m) |
| static mp_size_t | norm_len (const mp_limb_t *p, mp_size_t n) |
| static void | pad_add (const mp_limb_t *a, mp_size_t la, const mp_limb_t *b, mp_size_t lb, mp_size_t mx, mp_ptr sum) |
| static void | random_limbs (mp_ptr p, size_t n, u64 *seed) |
| static void | random_limbs_with_top (mp_ptr p, size_t n, u64 *seed, bool top_nonzero) |
| static u64 | shr1_inplace (mp_ptr p, size_t n, u64 top_bit) |
| static u64 | sub_small_inplace (mp_ptr p, size_t n, u64 v) |
| static u64 | submod32 (u64 a, u64 b, u64 m) |
| static u64 | xorshift64 (u64 *s) |
变量 | |
| static const u32 | MOD_P [] = {4294967291u, 4294967279u, 4294967231u, 2147483647u, 1000000007u} |
| static const int | MOD_P_CNT = (int)(sizeof(MOD_P) / sizeof(MOD_P[0])) |
在文件 lmmp_test_utils.h 第 34 行定义.
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
在文件 lmmp_test_utils.h 第 33 行定义.
在文件 lmmp_test_utils.h 第 63 行定义.
引用了 n.
在文件 lmmp_test_utils.h 第 124 行定义.
被这些函数引用 mod_is_sum().
|
inlinestatic |
在文件 lmmp_test_utils.h 第 210 行定义.
引用了 lmmp_mul_1_().
|
inlinestatic |
在文件 lmmp_test_utils.h 第 181 行定义.
引用了 lmmp_alloc(), lmmp_div_(), lmmp_free() , 以及 norm_len().
在文件 lmmp_test_utils.h 第 230 行定义.
引用了 k, lmmp_fibonacci2_(), lmmp_fibonacci_size_() , 以及 lmmp_zero.
|
inlinestatic |
在文件 lmmp_test_utils.h 第 121 行定义.
引用了 lmmp_mod_1_() , 以及 n.
被这些函数引用 mod_eq(), mod_is_diff(), mod_is_product() , 以及 mod_is_sum().
在文件 lmmp_test_utils.h 第 128 行定义.
引用了 an, bn, mod32(), mod_eq(), MOD_P, MOD_P_CNT , 以及 norm_len().
被这些函数引用 mod_eq().
|
inlinestatic |
在文件 lmmp_test_utils.h 第 167 行定义.
引用了 an, bn, mod32(), mod_is_diff(), MOD_P, MOD_P_CNT, norm_len() , 以及 submod32().
被这些函数引用 mod_is_diff().
|
inlinestatic |
在文件 lmmp_test_utils.h 第 139 行定义.
引用了 an, bn, mod32(), MOD_P, MOD_P_CNT, mulmod32() , 以及 norm_len().
|
inlinestatic |
在文件 lmmp_test_utils.h 第 153 行定义.
引用了 addmod32(), an, bn, mod32(), mod_is_sum(), MOD_P, MOD_P_CNT , 以及 norm_len().
被这些函数引用 mod_is_sum().
在文件 lmmp_test_utils.h 第 99 行定义.
引用了 an, bn , 以及 norm_len().
被这些函数引用 mpn_eq().
在文件 lmmp_test_utils.h 第 108 行定义.
|
inlinestatic |
在文件 lmmp_test_utils.h 第 203 行定义.
引用了 lmmp_mul_().
在文件 lmmp_test_utils.h 第 123 行定义.
被这些函数引用 mod_is_product().
在文件 lmmp_test_utils.h 第 57 行定义.
引用了 n.
被这些函数引用 divides_all(), mod_eq(), mod_is_diff(), mod_is_product(), mod_is_sum() , 以及 mpn_cmp().
|
inlinestatic |
在文件 lmmp_test_utils.h 第 191 行定义.
引用了 alloc_limbs(), lmmp_add_n_(), lmmp_free() , 以及 lmmp_zero.
在文件 lmmp_test_utils.h 第 52 行定义.
引用了 n , 以及 random_limbs_with_top().
在文件 lmmp_test_utils.h 第 47 行定义.
引用了 n , 以及 xorshift64().
被这些函数引用 random_limbs().
在文件 lmmp_test_utils.h 第 125 行定义.
被这些函数引用 mod_is_diff().
|
static |
在文件 lmmp_test_utils.h 第 117 行定义.
被这些函数引用 mod_eq(), mod_is_diff(), mod_is_product() , 以及 mod_is_sum().
在文件 lmmp_test_utils.h 第 118 行定义.
被这些函数引用 mod_eq(), mod_is_diff(), mod_is_product() , 以及 mod_is_sum().