我刚刚编译了 Visual Studio 的 MPIR 库,我发现它没有三角函数,也没有 float 的根函数。
我需要这个的原因是因为我需要使用精度大于 1000 位的超越数进行一些计算。
如果有人可以推荐一个能够实现此功能并且最好与 Visual Studio 2010 配合良好的库,我将非常感激。
最佳答案
查看 GNU MPFR homepage 上的相关软件链接.
特别是,MAPM可以做你想做的事:
MAPM: A Portable Arbitrary Precision Math Library in C
...
This library will perform the following functions to any desired precision level : SQRT, CBRT, SIN, COS, TAN, ARC-SIN, ARC-COS, ARC-TAN, ARC-TAN2, LOG, LOG10, EXP, POW, SINH, COSH, TANH, ARC-SINH, ARC-COSH, ARC-TANH, FLOOR, CEIL, GCD, LCM, and also FACTORIAL.
听起来它应该与 Visual Studio 一起使用:
It has been tested under Linux (x86), FreeBSD, HP-UX, Sun Solaris, Venix, MAC OSX, DOS, and Win 2000, NT, XP
... with the following compilers ....
o) Microsoft Visual C++ 6.0 (32 bit) and Microsoft C 5.1, 8.00c (16 bit)
关于c - C 语言有处理无理数的大型精度库吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9780250/