|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
函数 | |
| int | lmmp_leading_zeros_ (mp_limb_t x) |
| 计算一个单精度数(limb)中前导零的个数 | |
| int | lmmp_limb_bits_ (mp_limb_t x) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| int | lmmp_limb_popcnt_ (mp_limb_t x) |
| 计算一个64位无符号整数中1的个数 | |
| mp_limb_t | lmmp_mulh_ (mp_limb_t a, mp_limb_t b) |
| 计算两个64位无符号整数相乘的高位结果 (a*b)/B | |
| void | lmmp_mullh_ (mp_limb_t a, mp_limb_t b, mp_ptr restrict dst) |
| ulong | lmmp_mulmod_ulong_ (ulong a, ulong b, ulong mod, ulongp restrict q) |
| int | lmmp_tailing_zeros_ (mp_limb_t x) |
| 计算一个单精度数(limb)中末尾零的个数 | |
| int lmmp_leading_zeros_ | ( | mp_limb_t | x | ) |
计算一个单精度数(limb)中前导零的个数
| x | 输入的64位无符号整数 |
引用了 lmmp_leading_zeros_ , 以及 n.
| int lmmp_limb_bits_ | ( | mp_limb_t | x | ) |
Copyright (C) 2026 HJimmyK (Jericho Knox)
计算满足 2^k > x 的最小自然数k
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)
| x | 输入的64位无符号整数 |
引用了 k , 以及 lmmp_limb_bits_.
| int lmmp_limb_popcnt_ | ( | mp_limb_t | x | ) |
计算一个64位无符号整数中1的个数
| x | 输入的64位无符号整数 |
引用了 k , 以及 lmmp_limb_popcnt_.
计算两个64位无符号整数相乘的高位结果 (a*b)/B
| a | 第一个64位无符号整数 |
| b | 第二个64位无符号整数 |
引用了 _udiv_qrnnd_preinv, lmmp_inv_1_(), lmmp_leading_zeros_, lmmp_mulmod_ulong_() , 以及 restrict.
| int lmmp_tailing_zeros_ | ( | mp_limb_t | x | ) |
计算一个单精度数(limb)中末尾零的个数
| x | 输入的64位无符号整数 |
引用了 lmmp_tailing_zeros_ , 以及 n.