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,18 @@
#define NRANSI
#include "nrutil.h"
extern int nn;
extern float *fvec;
extern void (*nrfuncv)(int n, float v[], float f[]);
float fmin(float x[])
{
int i;
float sum;
(*nrfuncv)(nn,x,fvec);
for (sum=0.0,i=1;i<=nn;i++) sum += SQR(fvec[i]);
return 0.5*sum;
}
#undef NRANSI