---
title: 函数说明
description: "KML_MATH是C语言实现的基本数学函数库。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2200/accel/kunpengaccel_kml_16_0112.html
sourcePath: /source/zh/kunpengboostkithistory/2200/accel/kunpengaccel_kml_16_0112.html
indexId: 4c826f792e63d6c825f1c004b4888082700feca29799f4c921ab1bacf2ba52ca74
---
# 函数说明

KML_MATH是C语言实现的基本数学函数库。

其中，高性能版本计算结果对标开源数学库MPFR，高精度版本计算结果对标x86数学库。

| 函数类 | 函数名 | 描述 | 高性能版本 | 高精度版本 |
| --- | --- | --- | --- | --- |
| 三角函数 （Trigonometric functions） | sin | 正弦函数 | 实数单精度/双精度 复数单精度/双精度 | 实数单精度/双精度 |
| 三角函数 （Trigonometric functions） | cos | 余弦函数 | 实数单精度/双精度 复数单精度/双精度 | 实数单精度/双精度 |
| 三角函数 （Trigonometric functions） | sincos | 正弦、余弦函数 | 实数单精度/双精度 | 无 |
| 三角函数 （Trigonometric functions） | tan | 正切函数 | 实数单精度/双精度 复数单精度/双精度 | 实数单精度/双精度 |
| 三角函数 （Trigonometric functions） | asin | 反正弦函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 三角函数 （Trigonometric functions） | asind | 反正弦函数（入参为角度） | 无 | 实数单精度 |
| 三角函数 （Trigonometric functions） | acos | 反余弦函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 三角函数 （Trigonometric functions） | atan | 反正切函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 三角函数 （Trigonometric functions） | atan2 | 反正切函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 三角函数 （Trigonometric functions） | cosd | 余弦函数（入参为角度） | 无 | 实数单精度 |
| 超越函数 （Hyperbolic functions） | sinh | 双曲正弦函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 超越函数 （Hyperbolic functions） | cosh | 双曲余弦函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 超越函数 （Hyperbolic functions） | tanh | 双曲正切函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 超越函数 （Hyperbolic functions） | asinh | 反双曲正弦函数 | 实数单精度/双精度 | 无 |
| 超越函数 （Hyperbolic functions） | acosh | 反双曲余弦函数 | 实数单精度/双精度 | 无 |
| 超越函数 （Hyperbolic functions） | atanh | 反双曲正切函数 | 实数单精度/双精度 | 无 |
| 指数和对数函数 （Exponential and logarithmic functions） | exp | 指数函数 (base e) | 实数单精度/双精度 | 实数单精度/双精度 |
| 指数和对数函数 （Exponential and logarithmic functions） | exp2 | 指数函数 (base 2) | 实数单精度/双精度 | 实数单精度/双精度 |
| 指数和对数函数 （Exponential and logarithmic functions） | log | 对数函数 (base e) | 实数单精度/双精度 | 实数单精度/双精度 |
| 指数和对数函数 （Exponential and logarithmic functions） | log2 | 对数函数 (base 2) | 实数单精度/双精度 | 无 |
| 指数和对数函数 （Exponential and logarithmic functions） | log10 | 对数函数 (base 10) | 实数单精度/双精度 | 实数单精度/双精度 |
| 幂和根函数（Power and root function） | pow | 幂函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 幂和根函数（Power and root function） | powr8i4 | 幂函数（80位精度） | 无 | 实数双精度 |
| 幂和根函数（Power and root function） | sqrt | 平方根函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 幂和根函数（Power and root function） | cbrt | 立方根函数 | 实数单精度/双精度 | 实数单精度/双精度 |
| 杂项函数（Miscellaneous Functions） | fmod | 浮点数求模 | 无 | 实数单精度 |
| 杂项函数（Miscellaneous Functions） | tgamma | 伽马函数 | 实数单精度 | 实数单精度 |
