LMMC
Lamina Mathematic core
载入中...
搜索中...
未找到
config.h 文件参考

LMMC binary real type and arithmetic spelling. 更多...

#include <math.h>
config.h 的引用(Include)关系图:
此图展示该文件被哪些文件直接或间接地引用了:

浏览该文件的源代码.

宏定义

#define LMMC_LIBM(function)
#define LMMC_PRI_REAL   "f"
 用于 printf 的 lmmc_real_t 格式说明符。
#define LMMC_SCN_REAL   "lf"
 用于 scanf 的 lmmc_real_t 格式说明符。
#define LMMC_REAL_INIT(x)
 初始化一个 lmmc_real_t 变量(POD 类型为空操作)。
#define LMMC_REAL_CLEAR(x)
 释放一个 lmmc_real_t 变量(POD 类型为空操作)。
#define LMMC_REAL_SET(dst, src)
 将一个 lmmc_real_t 赋值到另一个:*dst = *src 。
#define LMMC_REAL_SET_D(dst, dbl)
 将一个 double 字面量赋值到 lmmc_real_t 。
#define LMMC_REAL_ADD(res, a, b)
 计算 *res = *a + *b 。
#define LMMC_REAL_SUB(res, a, b)
 计算 *res = *a - *b 。
#define LMMC_REAL_MUL(res, a, b)
 计算 *res = *a * *b 。
#define LMMC_REAL_DIV(res, a, b)
 计算 *res = *a / *b 。
#define LMMC_REAL_NEG(res, a)
 取相反数,*res = -*a 。
#define LMMC_REAL_SQRT(res, a)
 计算平方根,*res = sqrt(*a) 。
#define LMMC_REAL_ABS(res, a)
 计算绝对值,*res = |*a| 。
#define LMMC_REAL_EXP(res, a)
 计算自然指数,*res = exp(*a) 。
#define LMMC_REAL_LOG(res, a)
 计算自然对数,*res = log(*a) 。
#define LMMC_REAL_SIN(res, a)
 计算正弦,*res = sin(*a) 。
#define LMMC_REAL_COS(res, a)
 计算余弦,*res = cos(*a) 。
#define LMMC_REAL_TAN(res, a)
 计算正切,*res = tan(*a) 。
#define LMMC_REAL_COSH(res, a)
 计算双曲余弦,*res = cosh(*a) 。
#define LMMC_REAL_SINH(res, a)
 计算双曲正弦,*res = sinh(*a) 。
#define LMMC_REAL_ATAN2(res, y, x)
 计算反正切2,*res = atan2(*y, *x) 。
#define LMMC_REAL_CMP(a, b)
 比较 *a 与 *b ,返回 -1/0/1 。
#define LMMC_REAL_IS_FINITE(x)
 判断 *x 是否为有限数。
#define LMMC_REAL_EPSILON   ((lmmc_real_t)1e-15)
 既有算法的经验近似阈值,非机器 epsilon。
#define LMMC_CONST_PI   ((lmmc_real_t)3.14159265358979323846)
 圆周率常数 \(\pi\) 。

类型定义

typedef double lmmc_real_t
 Public and internal LMMC real type.

详细描述

LMMC binary real type and arithmetic spelling.

LMMC's C ABI is fixed to IEEE-754 binary64 (double). The operation macros centralize initialization and arithmetic syntax; they are not a pluggable precision backend.

在文件 config.h 中定义.

宏定义说明

◆ LMMC_LIBM

#define LMMC_LIBM ( function)
值:
::function

在文件 config.h 第 16 行定义.

◆ LMMC_PRI_REAL

#define LMMC_PRI_REAL   "f"

用于 printf 的 lmmc_real_t 格式说明符。

在文件 config.h 第 31 行定义.

◆ LMMC_SCN_REAL

#define LMMC_SCN_REAL   "lf"

用于 scanf 的 lmmc_real_t 格式说明符。

在文件 config.h 第 33 行定义.

◆ LMMC_REAL_INIT

◆ LMMC_REAL_CLEAR

#define LMMC_REAL_CLEAR ( x)

◆ LMMC_REAL_SET

◆ LMMC_REAL_SET_D

◆ LMMC_REAL_ADD

#define LMMC_REAL_ADD ( res,
a,
b )

◆ LMMC_REAL_SUB

◆ LMMC_REAL_MUL

◆ LMMC_REAL_DIV

#define LMMC_REAL_DIV ( res,
a,
b )

◆ LMMC_REAL_NEG

#define LMMC_REAL_NEG ( res,
a )
值:
(*(res) = -*(a))

取相反数,*res = -*a 。

在文件 config.h 第 55 行定义.

被这些函数引用 lmmc_complex_conj().

◆ LMMC_REAL_SQRT

#define LMMC_REAL_SQRT ( res,
a )
值:
(*(res) = LMMC_LIBM(sqrt)(*(a)))
#define LMMC_LIBM(function)

计算平方根,*res = sqrt(*a) 。

在文件 config.h 第 57 行定义.

被这些函数引用 lmmc_cholesky_decompose_inplace().

◆ LMMC_REAL_ABS

#define LMMC_REAL_ABS ( res,
a )
值:
(*(res) = LMMC_LIBM(fabs)(*(a)))

计算绝对值,*res = |*a| 。

在文件 config.h 第 59 行定义.

被这些函数引用 lmmc_double_nearly_equal_tol(), lmmc_mat_norm1(), lmmc_mat_norm_inf(), lmmc_sparse_from_dense(), lmmc_vec_asum(), lmmc_vec_cmp_eq(), lmmc_vec_iamax() , 以及 lmmc_vec_norm_inf().

◆ LMMC_REAL_EXP

#define LMMC_REAL_EXP ( res,
a )
值:
(*(res) = LMMC_LIBM(exp)(*(a)))

计算自然指数,*res = exp(*a) 。

在文件 config.h 第 62 行定义.

被这些函数引用 lmmc_complex_exp().

◆ LMMC_REAL_LOG

#define LMMC_REAL_LOG ( res,
a )
值:
(*(res) = LMMC_LIBM(log)(*(a)))

计算自然对数,*res = log(*a) 。

在文件 config.h 第 64 行定义.

◆ LMMC_REAL_SIN

#define LMMC_REAL_SIN ( res,
a )
值:
(*(res) = LMMC_LIBM(sin)(*(a)))

计算正弦,*res = sin(*a) 。

在文件 config.h 第 66 行定义.

被这些函数引用 lmmc_complex_cos(), lmmc_complex_exp() , 以及 lmmc_complex_sin().

◆ LMMC_REAL_COS

#define LMMC_REAL_COS ( res,
a )
值:
(*(res) = LMMC_LIBM(cos)(*(a)))

计算余弦,*res = cos(*a) 。

在文件 config.h 第 68 行定义.

被这些函数引用 lmmc_complex_cos(), lmmc_complex_exp() , 以及 lmmc_complex_sin().

◆ LMMC_REAL_TAN

#define LMMC_REAL_TAN ( res,
a )
值:
(*(res) = LMMC_LIBM(tan)(*(a)))

计算正切,*res = tan(*a) 。

在文件 config.h 第 70 行定义.

◆ LMMC_REAL_COSH

#define LMMC_REAL_COSH ( res,
a )
值:
(*(res) = LMMC_LIBM(cosh)(*(a)))

计算双曲余弦,*res = cosh(*a) 。

在文件 config.h 第 73 行定义.

◆ LMMC_REAL_SINH

#define LMMC_REAL_SINH ( res,
a )
值:
(*(res) = LMMC_LIBM(sinh)(*(a)))

计算双曲正弦,*res = sinh(*a) 。

在文件 config.h 第 75 行定义.

◆ LMMC_REAL_ATAN2

#define LMMC_REAL_ATAN2 ( res,
y,
x )
值:
(*(res) = LMMC_LIBM(atan2)(*(y), *(x)))

计算反正切2,*res = atan2(*y, *x) 。

在文件 config.h 第 77 行定义.

被这些函数引用 lmmc_complex_arg().

◆ LMMC_REAL_CMP

◆ LMMC_REAL_IS_FINITE

#define LMMC_REAL_IS_FINITE ( x)
值:
LMMC_LIBM(isfinite)(*(x))

判断 *x 是否为有限数。

在文件 config.h 第 82 行定义.

被这些函数引用 lmmc_double_nearly_equal_tol(), lmmc_lu_decompose_inplace() , 以及 lmmc_lu_solve().

◆ LMMC_REAL_EPSILON

#define LMMC_REAL_EPSILON   ((lmmc_real_t)1e-15)

既有算法的经验近似阈值,非机器 epsilon。

在文件 config.h 第 85 行定义.

被这些函数引用 lmmc_mat_rank() , 以及 lmmc_ode_jacobian_eval().

◆ LMMC_CONST_PI

#define LMMC_CONST_PI   ((lmmc_real_t)3.14159265358979323846)

圆周率常数 \(\pi\) 。

在文件 config.h 第 87 行定义.

被这些函数引用 lmmc_std_math_pi().

类型定义说明

◆ lmmc_real_t

typedef double lmmc_real_t

Public and internal LMMC real type.

This is deliberately fixed to double. Changing it is an ABI-breaking source migration requiring coordinated implementations of every direct arithmetic and libm call.

在文件 config.h 第 28 行定义.