|
LAMMP 4.2.0
Lamina High-Precision Arithmetic Library
|
#include "../../../include/lammp/impl/log2_exp2.h"#include "../../../include/lammp/impl/longlong.h"#include <stdbool.h>
log2_exp2.c 的引用(Include)关系图:宏定义 | |
| #define | EXP2_COEFFS_SIZE 24 |
| Copyright (C) 2026 HJimmyK(Jericho Knox) | |
| #define | EXP2_COEFFS_SIZE_64BIT 14 |
| #define | LOG2_COEFFS_SIZE_1 32 |
| #define | LOG2_COEFFS_SIZE_2 32 |
| #define | LOG2_COEFFS_SIZE_3 29 |
| #define | LOG2_COEFFS_SIZE_4 29 |
| #define | LOG2_COEFFS_SIZE_64BIT 27 |
函数 | |
| 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 | |
| static bool | leq_192 (const uint64_t A[3], const uint64_t B[3]) |
| 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) | |
| static void | umul128x64_tohi128 (uint64_t dst[2], const uint64_t i128[2], uint64_t i64) |
| static void | umul192x128_tohi192 (uint64_t dst[3], const uint64_t i192[3], const uint64_t i128[2]) |
变量 | |
| static const uint64_t | exp2_coeffs [][3] |
| static const uint64_t | exp2_coeffs_64bit [][2] |
| static const uint64_t | log2_coeffs_1 [][3] |
| static const uint64_t | log2_coeffs_2 [][3] |
| static const uint64_t | log2_coeffs_3 [][3] |
| static const uint64_t | log2_coeffs_4 [][3] |
| static const uint64_t | log2_coeffs_64bit [][2] |
| static const bool | log2_coeffs_bool_1 [] |
| static const bool | log2_coeffs_bool_2 [] |
| static const bool | log2_coeffs_bool_3 [] |
| static const bool | log2_coeffs_bool_4 [] |
| static const bool | log2_coeffs_bool_64bit [] |
| #define EXP2_COEFFS_SIZE 24 |
Copyright (C) 2026 HJimmyK(Jericho Knox)
This file is part of LAMMP.
LAMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed WITHOUT ANY WARRANTY.
See https://www.gnu.org/licenses/.
在文件 log2_exp2.c 第 43 行定义.
| #define EXP2_COEFFS_SIZE_64BIT 14 |
在文件 log2_exp2.c 第 448 行定义.
| #define LOG2_COEFFS_SIZE_1 32 |
在文件 log2_exp2.c 第 211 行定义.
| #define LOG2_COEFFS_SIZE_2 32 |
在文件 log2_exp2.c 第 212 行定义.
| #define LOG2_COEFFS_SIZE_3 29 |
在文件 log2_exp2.c 第 213 行定义.
| #define LOG2_COEFFS_SIZE_4 29 |
在文件 log2_exp2.c 第 214 行定义.
| #define LOG2_COEFFS_SIZE_64BIT 27 |
在文件 log2_exp2.c 第 427 行定义.
| 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 第 409 行定义.
引用了 _u192add, coeff, exp2_coeffs, EXP2_COEFFS_SIZE, n , 以及 umul192x128_tohi192().
被这些函数引用 lmmp_cbrtapprox_6_().
函数调用图:
这是这个函数的调用关系图:| uint64_t exp2_fixed_64 | ( | uint64_t | x | ) |
floor(exp2(x/B)*B-B), B=2^64
| x | 输入的小数部分 |
在文件 log2_exp2.c 第 485 行定义.
引用了 _u128add, coeff, exp2_coeffs_64bit, EXP2_COEFFS_SIZE_64BIT, n , 以及 umul128x64_tohi128().
被这些函数引用 lmmp_cbrtapprox_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 第 292 行定义.
引用了 _u192add, _u192sub, coeff, leq_192(), log2_coeffs_1, log2_coeffs_2, log2_coeffs_3, log2_coeffs_4, log2_coeffs_bool_1, log2_coeffs_bool_2, log2_coeffs_bool_3, log2_coeffs_bool_4, LOG2_COEFFS_SIZE_1, LOG2_COEFFS_SIZE_2, LOG2_COEFFS_SIZE_3, LOG2_COEFFS_SIZE_4, n , 以及 umul192x128_tohi192().
被这些函数引用 lmmp_cbrtapprox_6_().
函数调用图:
这是这个函数的调用关系图:| uint64_t log2_fixed_64 | ( | uint64_t | x | ) |
Copyright (C) 2026 HJimmyK(Jericho Knox)
This file is part of LAMMP.
LAMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed WITHOUT ANY WARRANTY.
See https://www.gnu.org/licenses/.
floor(log2(1+x/B)*B), B=2^64
| x | 输入的小数部分 |
在文件 log2_exp2.c 第 458 行定义.
引用了 _u128add, _u128cmp, _u128sub, coeff, log2_coeffs_64bit, log2_coeffs_bool_64bit, LOG2_COEFFS_SIZE_64BIT, n , 以及 umul128x64_tohi128().
被这些函数引用 lmmp_cbrtapprox_3_().
函数调用图:
这是这个函数的调用关系图:
|
inlinestatic |
在文件 log2_exp2.c 第 264 行定义.
引用了 _umul64to128_(), a0, a1, b0 , 以及 n.
被这些函数引用 exp2_fixed_64() , 以及 log2_fixed_64().
函数调用图:
这是这个函数的调用关系图:
|
inlinestatic |
在文件 log2_exp2.c 第 216 行定义.
引用了 _umul64to128_(), a0, a1, a2, b0, b1 , 以及 n.
被这些函数引用 exp2_fixed_128() , 以及 log2_fixed_128().
函数调用图:
这是这个函数的调用关系图:
|
static |
在文件 log2_exp2.c 第 44 行定义.
被这些函数引用 exp2_fixed_128().
|
static |
在文件 log2_exp2.c 第 449 行定义.
被这些函数引用 exp2_fixed_64().
|
static |
在文件 log2_exp2.c 第 69 行定义.
被这些函数引用 log2_fixed_128().
|
static |
在文件 log2_exp2.c 第 106 行定义.
被这些函数引用 log2_fixed_128().
|
static |
在文件 log2_exp2.c 第 143 行定义.
被这些函数引用 log2_fixed_128().
|
static |
在文件 log2_exp2.c 第 177 行定义.
被这些函数引用 log2_fixed_128().
|
static |
在文件 log2_exp2.c 第 428 行定义.
被这些函数引用 log2_fixed_64().
在文件 log2_exp2.c 第 102 行定义.
被这些函数引用 log2_fixed_128().
在文件 log2_exp2.c 第 139 行定义.
被这些函数引用 log2_fixed_128().
在文件 log2_exp2.c 第 173 行定义.
被这些函数引用 log2_fixed_128().
在文件 log2_exp2.c 第 207 行定义.
被这些函数引用 log2_fixed_128().
在文件 log2_exp2.c 第 444 行定义.
被这些函数引用 log2_fixed_64().