1.0000 1.0000
2.0000 1.4142
3.0000 1.7321
4.0000 2.0000
5.0000 2.2361
6.0000 2.4495
7.0000 2.6458
8.0000 2.8284
9.0000 3.0000
10.000 3.1623
-1 8.9
0 4.05
1 1.07
2 0.1
3 1.1
4 3.88
5 9.2
#include <math.h>
double func(double x,
const double *p)
{
return(exp(-p[0]*x)*sin(p[1]*3.1416*x));
}
Save this as fkt.c, in your home directory.
gcc -Wall -shared -fPIC -o fkt.so fkt.c -lm
Do this in a X terminal window (shell).
nm fkt.so > fkt.def