|
LMMP 4.3.0
Lamina High-Precision Arithmetic Library
|
#include "lmmp/lmmpn.h"#include "cases.h"#include "support/lmmp_test_utils.h"#include <ctype.h>#include <stdio.h>#include <string.h>函数 | |
| static void | check_decimal_one (mp_srcptr x, mp_size_t n) |
| static void | check_hex_one (mp_srcptr x, mp_size_t n) |
| static void | check_value (mp_srcptr x, mp_size_t n, const mp_byte_t *expect, mp_size_t expected_len, int base) |
| static int | limb_bits_of (u64 x) |
| static mp_size_t | ref_digits (mp_byte_t *out, mp_srcptr x, mp_size_t n, int base) |
| Copyright (C) 2026 HJimmyK (Jericho Knox) | |
| static mp_size_t | ref_hex_string (char *out, mp_srcptr x, mp_size_t n, bool upper) |
| static mp_size_t | ref_value (mp_ptr val, mp_size_t cap, const mp_byte_t *d, mp_size_t len, int base) |
| TEST_CASE ("str/decimal_powcache", decimal_pow_cache_lifecycle) | |
| TEST_CASE ("str/decimal_spec", decimal_specialized) | |
| TEST_CASE ("str/hex_spec", hex_specialized) | |
| TEST_CASE ("str/known", known_values) | |
| TEST_CASE ("str/roundtrip", to_str_from_str_roundtrip) | |
| void | test_str (void) |
在文件 test_str.c 第 135 行定义.
引用了 check_decimal_one(), lmmp_alloc(), lmmp_dec_to_chars_(), lmmp_free(), lmmp_from_decimal_(), lmmp_from_decimal_len_(), lmmp_from_str_(), lmmp_from_str_len_(), lmmp_to_decimal_(), lmmp_to_decimal_len_(), lmmp_to_str_(), lmmp_to_str_len_(), n, ref_digits(), TEST_CHECK_EQ , 以及 TEST_CHECK_MSG.
被这些函数引用 check_decimal_one(), TEST_CASE() , 以及 TEST_CASE().
在文件 test_str.c 第 100 行定义.
引用了 check_hex_one(), lmmp_alloc(), lmmp_free(), lmmp_from_hex_(), lmmp_from_hex_len_(), lmmp_to_hex_(), lmmp_to_hex_len_(), n, ref_hex_string(), TEST_CHECK_EQ , 以及 TEST_CHECK_MSG.
被这些函数引用 check_hex_one() , 以及 TEST_CASE().
|
static |
在文件 test_str.c 第 247 行定义.
引用了 check_value(), lmmp_alloc(), lmmp_free(), lmmp_to_str_(), lmmp_to_str_len_(), n, TEST_CHECK_EQ , 以及 TEST_CHECK_MSG.
被这些函数引用 check_value() , 以及 TEST_CASE().
|
static |
在文件 test_str.c 第 75 行定义.
引用了 k , 以及 limb_bits_of().
被这些函数引用 limb_bits_of() , 以及 ref_hex_string().
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
在文件 test_str.c 第 46 行定义.
引用了 lmmp_div_1_(), lmmp_free(), lmmp_zero, n , 以及 ref_digits().
被这些函数引用 check_decimal_one(), ref_digits() , 以及 TEST_CASE().
在文件 test_str.c 第 86 行定义.
引用了 limb_bits_of(), n , 以及 ref_hex_string().
被这些函数引用 check_hex_one() , 以及 ref_hex_string().
|
static |
在文件 test_str.c 第 65 行定义.
引用了 lmmp_mul_1_(), lmmp_zero , 以及 ref_value().
被这些函数引用 ref_value() , 以及 TEST_CASE().
| TEST_CASE | ( | "str/decimal_powcache" | , |
| decimal_pow_cache_lifecycle | ) |
在文件 test_str.c 第 360 行定义.
引用了 check_decimal_one(), lmmp_free(), lmmp_global_deinit(), lmmp_global_init() , 以及 TEST_CASE.
| TEST_CASE | ( | "str/decimal_spec" | , |
| decimal_specialized | ) |
在文件 test_str.c 第 316 行定义.
引用了 ARRAY_SIZE, check_decimal_one(), lmmp_free(), lmmp_from_decimal_(), lmmp_from_decimal_len_(), lmmp_to_decimal_(), lmmp_to_decimal_len_(), n, TEST_CASE, TEST_CHECK_EQ , 以及 TEST_CHECK_MSG.
| TEST_CASE | ( | "str/hex_spec" | , |
| hex_specialized | ) |
在文件 test_str.c 第 278 行定义.
引用了 ARRAY_SIZE, check_hex_one(), lmmp_free(), lmmp_from_hex_(), lmmp_from_hex_len_(), lmmp_to_hex_(), lmmp_to_hex_len_(), n, TEST_CASE , 以及 TEST_CHECK_EQ.
| TEST_CASE | ( | "str/known" | , |
| known_values | ) |
在文件 test_str.c 第 258 行定义.
引用了 ARRAY_SIZE, check_value(), LIMB_MAX, TEST_CASE, v0 , 以及 v1.
| TEST_CASE | ( | "str/roundtrip" | , |
| to_str_from_str_roundtrip | ) |
在文件 test_str.c 第 190 行定义.
引用了 ARRAY_SIZE, bn, lmmp_alloc(), lmmp_free(), lmmp_from_str_(), lmmp_from_str_len_(), lmmp_to_str_(), lmmp_to_str_len_(), lmmp_zero, n, ref_digits(), ref_value(), TEST_CASE, TEST_CHECK_EQ , 以及 TEST_CHECK_MSG.
| void test_str | ( | void | ) |
在文件 test_str.c 第 381 行定义.
引用了 TEST_RUN , 以及 test_str().
被这些函数引用 main() , 以及 test_str().