add numerical recipes library

This commit is contained in:
2025-09-12 18:55:25 +09:00
parent d4dff245bd
commit 2c75620ec9
1344 changed files with 63869 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
static float xsav,ysav;
static float (*nrfunc)();
float quad3d(func,x1,x2)
float (*func)(),x1,x2;
{
float f1(),qgaus();
nrfunc=func;
return qgaus(f1,x1,x2);
}
float f1(x)
float x;
{
float f2(),qgaus();
float yy1(),yy2();
xsav=x;
return qgaus(f2,yy1(x),yy2(x));
}
float f2(y)
float y;
{
float f3(),qgaus();
float z1(),z2();
ysav=y;
return qgaus(f3,z1(xsav,y),z2(xsav,y));
}
float f3(z)
float z;
{
return (*nrfunc)(xsav,ysav,z);
}