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,22 @@
#define IB1 1
#define IB2 2
#define IB5 16
#define IB18 131072
#define MASK (IB1+IB2+IB5)
int irbit2(unsigned long *iseed)
{
if (*iseed & IB18) {
*iseed=((*iseed ^ MASK) << 1) | IB1;
return 1;
} else {
*iseed <<= 1;
return 0;
}
}
#undef MASK
#undef IB18
#undef IB5
#undef IB2
#undef IB1