|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include <stdint.h>结构体 | |
| struct | _udiv64_t |
宏定义 | |
| #define | _ADD_MARKER 0x40 |
| #define | _add_ssaaaa(sh, sl, ah, al, bh, bl) |
| #define | _sub_ddmmss(sh, sl, ah, al, bh, bl) |
| #define | _U64_SHIFT_MASK 0x3F |
| from https://libdivide.com/ | |
| #define | _udiv32by32_q_preinv(q, n0, dinv) |
| #define | _udiv_qr_3by2(q, r1, r0, n2, n1, n0, d1, d0, dinv) |
| #define | _udiv_qrnnd_preinv(q, r, nh, nl, d, di) |
| #define | clz_shl_u32(r, x, cnt) |
| #define | clz_shl_u64(r, x, cnt) |
| #define | ctz_shr_u32(r, x, cnt) |
| #define | ctz_shr_u64(r, x, cnt) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
类型定义 | |
| typedef struct _udiv64_t | _udiv64_t |
函数 | |
| static uint64_t | _bpow_preinv_ (uint64_t m, uint64_t k, int nb, uint64_t inv) |
| static uint64_t | _bpow_step_ (uint64_t nh, uint64_t m, uint64_t inv) |
| static uint64_t | _udiv128by64to64_ (uint64_t numhi, uint64_t numlo, uint64_t den, uint64_t *r) |
| static _udiv64_t | _udiv64_gen (uint64_t d) |
| static _udiv64_t | _udiv64_gen_internal_ (uint64_t d, int branchfree) |
| static uint64_t | _udiv64by64_q_preinv (uint64_t numer, const _udiv64_t *denom) |
| static __uint128_t | _umul128to128_ (uint64_t a_high, uint64_t a_low, uint64_t b_high, uint64_t b_low) |
| static void | _umul128to256_ (uint64_t a_high, uint64_t a_low, uint64_t b_high, uint64_t b_low, uint64_t rr[4]) |
| static void | _umul64to128_ (uint64_t a, uint64_t b, uint64_t *low, uint64_t *high) |
| static uint64_t | _umul64to64hi_ (uint64_t a, uint64_t b) |
| static void | _umulhi128_sloppy_ (uint64_t a_high, uint64_t a_low, uint64_t b_high, uint64_t b_low, uint64_t rr[2]) |
| static void | _umullo128x64_ (uint64_t a_high, uint64_t a_low, uint64_t b, uint64_t rr[2]) |
| static void | _usqr128to192_ (uint64_t a_high, uint64_t a_low, uint64_t rr[3]) |
| static void | _usqr128to256_ (uint64_t a_high, uint64_t a_low, uint64_t rr[4]) |
| struct _udiv64_t |
| #define _ADD_MARKER 0x40 |
在文件 longlong.h 第 673 行定义.
被这些函数引用 _udiv64_gen_internal_().
| #define _add_ssaaaa | ( | sh, | |
| sl, | |||
| ah, | |||
| al, | |||
| bh, | |||
| bl ) |
在文件 longlong.h 第 495 行定义.
被这些函数引用 ll_small_2_powmod(), lmmp_sqrt_3_() , 以及 lmmp_sqrt_4_().
| #define _sub_ddmmss | ( | sh, | |
| sl, | |||
| ah, | |||
| al, | |||
| bh, | |||
| bl ) |
在文件 longlong.h 第 503 行定义.
被这些函数引用 is2_notrial_i_(), ll_small_is_prime_mr(), ll_small_reduce2_precise(), ll_small_sqrmod(), ll_small_sqrmod_sloppy(), lmmp_sqrt_3_() , 以及 lmmp_sqrt_4_().
| #define _U64_SHIFT_MASK 0x3F |
| #define _udiv32by32_q_preinv | ( | q, | |
| n0, | |||
| dinv ) |
在文件 longlong.h 第 661 行定义.
被这些函数引用 count_2facodd_factors(), count_factors(), count_factors() , 以及 count_factors().
在文件 longlong.h 第 634 行定义.
被这些函数引用 ipn_sdiv_mul1_(), lmmp_div_2_(), lmmp_div_2_s_(), lmmp_div_3_2_(), lmmp_div_basecase_() , 以及 lmmp_mod_2_().
| #define _udiv_qrnnd_preinv | ( | q, | |
| r, | |||
| nh, | |||
| nl, | |||
| d, | |||
| di ) |
在文件 longlong.h 第 596 行定义.
被这些函数引用 lmmp_div3_(), lmmp_div_1_(), lmmp_div_1_s_(), lmmp_mod_1_(), lmmp_mod_preinv_1_() , 以及 lmmp_mulmod_ulong_().
| #define clz_shl_u32 | ( | r, | |
| x, | |||
| cnt ) |
在文件 longlong.h 第 119 行定义.
| #define clz_shl_u64 | ( | r, | |
| x, | |||
| cnt ) |
在文件 longlong.h 第 69 行定义.
被这些函数引用 _udiv128by64to64_(), _udiv64_gen_internal_(), mont_R2(), mont_R2() , 以及 trialdiv_init_chunk_().
| #define ctz_shr_u32 | ( | r, | |
| x, | |||
| cnt ) |
在文件 longlong.h 第 105 行定义.
被这些函数引用 lmmp_odd_nPr_product_() , 以及 lmmp_odd_nPr_product_().
| #define ctz_shr_u64 | ( | r, | |
| x, | |||
| cnt ) |
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
在文件 longlong.h 第 55 行定义.
被这些函数引用 lmmp_arith_seqprod_(), lmmp_gcdext_derive_(), lmmp_is_prime_uint_notrial_(), lmmp_is_prime_ulong_notrial_(), lmmp_odd_nCr_uint_(), lmmp_odd_nCr_ushort_(), lmmp_odd_nPr_uint_(), lmmp_odd_nPr_ulong_(), lmmp_odd_nPr_ushort_(), lmmp_powlo_(), lmmp_powlo_1_(), lmmp_powlo_2_(), lmmp_powmod_1_(), lmmp_powmod_2_() , 以及 lmmp_powmod_odd_mont_().
| typedef struct _udiv64_t _udiv64_t |
|
inlinestatic |
在文件 longlong.h 第 626 行定义.
引用了 _bpow_preinv_(), _bpow_step_() , 以及 k.
被这些函数引用 _bpow_preinv_(), mont_R2(), mont_R2() , 以及 trialdiv_init_chunk_().
|
inlinestatic |
在文件 longlong.h 第 616 行定义.
引用了 _bpow_step_() , 以及 s.
被这些函数引用 _bpow_preinv_() , 以及 _bpow_step_().
|
inlinestatic |
在文件 longlong.h 第 386 行定义.
引用了 _udiv128by64to64_(), c1 , 以及 clz_shl_u64.
被这些函数引用 _udiv128by64to64_(), _udiv64_gen_internal_(), lmmp_powmod_1_(), lmmp_sqrt_3_() , 以及 lmmp_sqrt_4_().
|
inlinestatic |
在文件 longlong.h 第 734 行定义.
引用了 _U64_SHIFT_MASK, _udiv64_gen(), _udiv64_gen_internal_() , 以及 tmp.
被这些函数引用 _udiv64_gen() , 以及 lmmp_powmod_uint_odd_().
|
inlinestatic |
在文件 longlong.h 第 681 行定义.
引用了 _ADD_MARKER, _udiv128by64to64_(), _udiv64_gen_internal_(), clz_shl_u64, _udiv64_t::magic, _udiv64_t::more , 以及 t.
被这些函数引用 _udiv64_gen() , 以及 _udiv64_gen_internal_().
|
inlinestatic |
在文件 longlong.h 第 740 行定义.
引用了 _udiv64by64_q_preinv(), _umul64to64hi_(), _udiv64_t::magic, _udiv64_t::more , 以及 t.
被这些函数引用 _udiv64by64_q_preinv() , 以及 lmmp_powmod_uint_odd_().
|
inlinestatic |
在文件 longlong.h 第 381 行定义.
引用了 _umul128to128_().
被这些函数引用 _umul128to128_(), ll_small_sqrmod_sloppy(), lmmp_binvert_4_(), lmmp_binvert_unbalance_2_(), lmmp_divexact_2_(), lmmp_is_prime_2_() , 以及 lmmp_powlo_2_().
|
inlinestatic |
在文件 longlong.h 第 166 行定义.
引用了 _umul128to256_(), _umul64to128_(), r0, r1, r2 , 以及 r3.
被这些函数引用 _umul128to256_(), exp2_fixed_128(), lmmp_binvert_4_(), lmmp_binvert_unbalance_2_(), lmmp_divexact_2_(), log2_fixed_128(), mul_128() , 以及 mul_128().
|
inlinestatic |
在文件 longlong.h 第 132 行定义.
引用了 _umul64to128_(), prod, r0, r1, r2 , 以及 r3.
被这些函数引用 _umul128to192_(), _umul128to256_(), _umul64to128_(), _usqr128to256_(), exp2_fixed_64(), lmmp_binvert_2_(), lmmp_binvert_4_(), lmmp_binvert_unbalance_1_(), lmmp_divexact_1_(), lmmp_divexact_basecase_(), lmmp_divexact_odd_pi_(), lmmp_hgcd_lehmer2_(), lmmp_hgcd_matrix_mul_u_(), lmmp_hgcd_step_(), lmmp_inv_2_1_(), lmmp_mont_redc_bc_(), log2_fixed_64() , 以及 pcg64_128_action().
|
inlinestatic |
在文件 longlong.h 第 150 行定义.
引用了 _umul64to64hi_(), r0, r1, r2, r3 , 以及 t.
被这些函数引用 _udiv64by64_q_preinv(), _umul64to64hi_(), exp2_fixed_64(), ll_small_reduce2_precise(), lmmp_divexact_basecase_(), lmmp_mont_init_(), log2_fixed_64() , 以及 urem32_preinv().
|
inlinestatic |
在文件 longlong.h 第 512 行定义.
引用了 _umulhi128_sloppy_(), r0, r1 , 以及 s.
被这些函数引用 _umulhi128_sloppy_() , 以及 ll_small_sqrmod_sloppy().
|
inlinestatic |
在文件 longlong.h 第 571 行定义.
引用了 _umullo128x64_(), r0, r1 , 以及 t.
被这些函数引用 _umullo128x64_(), ll_small_mul1_() , 以及 ll_small_reduce2_precise().
|
inlinestatic |
在文件 longlong.h 第 540 行定义.
引用了 _usqr128to192_(), r0, r1, r2 , 以及 t.
被这些函数引用 _usqr128to192_() , 以及 ll_small_sqrmod_sloppy().
|
inlinestatic |
在文件 longlong.h 第 279 行定义.
引用了 _umul64to128_(), _usqr128to256_(), r0, r1, r2 , 以及 r3.
被这些函数引用 _usqr128to256_(), exp2_fixed_128(), log2_fixed_128(), log2_fixed_64(), sqr_128() , 以及 sqr_128().