gamma or log gamma function in C or C [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am seeking a C or C++ version of gamma and log gamma functions.
Are there any code pieces or libraries recommended?
If possible, I want to know the principle of the implementations.
Thank you!!!

In c++11, you can use std::lgamma for log gamma, and tgamma for gamma.

If you can't use C++11: The GNU GSL has all Gamma function you would ever need: http://www.gnu.org/software/gsl/manual/html_node/Gamma-Functions.html#index-gsl_005fsf_005flngamma-583
Or you can have a look at boost's math special functions:
http://www.boost.org/doc/libs/1_53_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/lgamma.html

You can try to have a look at Numerical Recipes In C, it should contain the functions you need.

Related

C program to solve expressions with functions in it [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I tried to write a program some thing like a expression solver to support only the following functions
length();
substr();
concat();
Hence if the user inputs
concat('Int Part : ', substr(5.00+4.00, 0, 1))
the output should be
Int Part : 9
Is there any library to do this or is there any place I can learn how to do this kind of thing.
I guess you should take a look at this: http://en.wikipedia.org/wiki/Recursive_descent_parser
Also, I suggest bison and yacc which are powerful tools for what you need. But they are a bit complex.

C++ Hermite polynomial implementation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Can anyone recommend a good numerical library providing a C++ implementation of Hermite polynomials? I am building them brute force, using iterative algorithms, but I would like some ready made alternatives which will probably work more quickly.
If you don't mind using Boost, there is a Hermite polynomial implementation in boost/math/special_functions/hermite.hpp
Check out the docs here: http://www.boost.org/doc/libs/1_55_0/libs/math/doc/html/math_toolkit/sf_poly/hermite.html
The Boost libraries have a ready made set of functions for Hermite Polynomials.
#include <boost/math/special_functions/hermite.hpp>
I've never used this boost header but you can start reading about it here:
http://www.boost.org/doc/libs/1_36_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html

plotting inside C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I am trying to plot variables in C++ inside a for loop. In Matlab, it is very easy, just type plot(x,y), but I do not know how to use it in C++. Is it possible to do it with opencv? or if anybody has a better recommendation I really appreciate it.
If you want high quality plots take a look at gnuplot (can be used from C++ program) or asymptote (you can generate script and use this script for render your plot), but these tools are not for dynamic plotting.
Use the cvplot library, it will provide matlab style plotting function in opencv. You can also use this library.

C++ SpellChecker Library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Can anybody recommend a good (ideally open source) C++ spell checker library. We are currenly using Talo, which isn't very good, so we are looking to change.
One which includes a grammar checker would also be good.
Thanks
I have heard good things about hunspell. I have used and integrated aspell, which has some nice features and some which I did not like.
If you've got internet access, you can always use on online service like SpellCheck.net which has a CGI interface that you can query.
Following on from Yuval - OpenOffice Lingucomponent

Computing pseudo-inverse of a matrix in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking to compute the Moore-Penrose pseudo-inverse of a matrix in C++, can someone point me to a library implementation or a numerical recipe?
Thanks!
You need 'Single Value Decomposition', from which you can find a C implementation here from Numerical Recipes in C.
This other site describes how to use single value decomposition to calculate the pseudo-inverse.