From b42ba105a279311a9560e0236e8f56bbd8e60e52 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Tue, 2 Jun 2026 19:56:02 +0800 Subject: [PATCH] =?UTF-8?q?docs(readme):=20=E6=9B=B4=E6=96=B0=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=BA=93=E5=AE=89=E8=A3=85=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 GMP、MPFR、libmpdec 高精度数学库依赖说明 - 提供 Ubuntu/Debian、RHEL/CentOS/Fedora、Arch Linux 系统的安装命令 - 补充各库的功能说明:GMP 用于 BigInt,MPFR 用于 BigFloat,libmpdec 用于 Decimal --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index c172fc4a..e08ec0a9 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,20 @@ - 需要 PHP-8.2 以上版本 - 需要 GCC-9 以上版本,支持 C++17 标准 - 需要 CMake-3.24 以上版本 +- 需要高精度数学库:`GMP`、`MPFR`、`libmpdec` + +```shell +# Ubuntu/Debian +sudo apt install libgmp-dev libmpfr-dev libmpdec-dev + +# RHEL/CentOS/Fedora +sudo dnf install gmp-devel mpfr-devel libmpdec-devel + +# Arch Linux +sudo pacman -S gmp mpfr mpdecimal +``` + +> GMP 用于 `BigInt` 任意精度整数,MPFR 用于 `BigFloat` 高精度浮点数,libmpdec 用于 `Decimal` 十进制高精度小数。 > 预览版目前仅支持 `Linux` 系统,建议使用 `Ubuntu 22.04`