|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include <stdint.h>函数 | |
| void | exp2_fixed_128 (uint64_t *dst, uint64_t high, uint64_t low) |
| 计算 floor(exp2(x/B)*B-B), B=2^128 | |
| uint64_t | exp2_fixed_64 (uint64_t x) |
| 计算 floor(exp2(x/B)*B-B), B=2^64 | |
| void | log2_fixed_128 (uint64_t *dst, uint64_t high, uint64_t low) |
| 计算 floor(log2(1+x/B)*B), B=2^128 | |
| uint64_t | log2_fixed_64 (uint64_t x) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| void exp2_fixed_128 | ( | uint64_t * | dst, |
| uint64_t | high, | ||
| uint64_t | low ) |
计算 floor(exp2(x/B)*B-B), B=2^128
| high | 输入的小数部分高64位 |
| low | 输入的小数部分低64位 |
| dst | 输出数组(2个元素):dst[0] 为低64位,dst[1] 为高64位 |
在文件 log2_exp2.c 第 461 行定义.
引用了 _umul128to256_(), _usqr128to256_(), A, add_u128, add_u192, B, exp2_fixed_128(), k, r0, r1, umul128_tohi128(), umul128_tohi128_r(), xp2_c, xp2_T16 , 以及 xp2_T8.
被这些函数引用 exp2_fixed_128(), lmmp_cbrt_6_est_() , 以及 lmmp_nthroot_().
| uint64_t exp2_fixed_64 | ( | uint64_t | x | ) |
计算 floor(exp2(x/B)*B-B), B=2^64
| x | 输入的小数部分 |
在文件 log2_exp2.c 第 345 行定义.
引用了 _umul64to128_(), _umul64to64hi_(), A, B, exp2_fixed_64(), k, t, umul128_tohi128_r(), xp2_c, xp2_T16 , 以及 xp2_T8.
被这些函数引用 exp2_fixed_64() , 以及 lmmp_cbrt_3_().
| void log2_fixed_128 | ( | uint64_t * | dst, |
| uint64_t | high, | ||
| uint64_t | low ) |
计算 floor(log2(1+x/B)*B), B=2^128
| high | 输入的小数部分高64位 |
| low | 输入的小数部分低64位 |
| dst | 输出数组(2个元素):dst[0] 为低64位,dst[1] 为高64位 |
在文件 log2_exp2.c 第 392 行定义.
引用了 _umul128to256_(), _usqr128to256_(), A, add_u192, B, k, lg2_c27, lg2_L32, lg2_R32, log2_fixed_128(), sub_u192, umul128_tohi128() , 以及 umul128_tohi128_r().
被这些函数引用 lmmp_cbrt_6_est_(), lmmp_nthroot_() , 以及 log2_fixed_128().
| uint64_t log2_fixed_64 | ( | uint64_t | x | ) |
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
计算 floor(log2(1+x/B)*B), B=2^64
| x | 输入的小数部分 |
在文件 log2_exp2.c 第 281 行定义.
引用了 _umul64to128_(), _umul64to64hi_(), _usqr128to256_(), A, add_u128, B, lg2_c27, lg2_L32, lg2_R32, log2_fixed_64(), sub_u128 , 以及 w2.
被这些函数引用 lmmp_cbrt_3_() , 以及 log2_fixed_64().