C math library with integration? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be开发者_StackOverflow社区 answered with facts and citations.
Closed 7 years ago.
Improve this questionIs there a science/math related C/C++ programming library that includes functions for mathematical integration? This might be useful for finding values for a cumulative distribution function, etc. Symbolic manipulation ideal but not required. Thanks!
P.S. I've looked at GSL but it does not contain functions specific for integration.
But GSL does have numerical integration capabilities ...is there some other reason this library doesn't meet your needs?
For symbolic math, Mathematica is a popular choice. They support a C API .
ROOT. This is a free open source software package for physicists, it inludes integration techniques of course, Math_GSLIntegrator.html">http://root.cern.ch/root/html/ROOT_Math_GSLIntegrator.html
As suggested by John, if you want the Cumulative Distribution Function of a standard function, using a specific solution would be a better approach. He pointed out DCDFLIB. GSL has a very large number of specific CDFs, hidden in Chapter 19, "Random Number Distributions".
To do numerically evaluate the CDF of a unusual function, there are several choices in GSL, e.g., gsl_integration_qag for an integral from a to b, or gsl_integration_qagiu, which does semi-infinite integrals from a to +infinity.
Regarding the numerical integration, you can also look at some commercial package, for exmaple, NAG
Wikipedia has lists and comparisons of numerical analysis software (many of which will do numerical integration, and some of which are C/C++ libraries or have an appropriate API), and comparisons of computer algebra software.
You can find cumulative distribution functions using integration, but there are direct methods that far more efficient and more accurate. For example, there is a library, DCDFLIB, for computing CDFs. It's available in C and Fortran here and in managed C++ here.
精彩评论