Category : C Source Code
Archive   : RECIPEX.ZIP
Filename : CEL.C
#define CA 0.0003
#define PIO2 1.57079632679490
float cel(qqc,pp,aa,bb)
float qqc,pp,aa,bb;
{
float a,b,e,f,g,em,p,q,qc;
void nrerror();
if (qqc == 0.0) nrerror("Bad qqc in routine CEL");
qc=fabs(qqc);
a=aa;
b=bb;
p=pp;
e=qc;
em=1.0;
if (p > 0.0) {
p=sqrt(p);
b /= p;
} else {
f=qc*qc;
q=1.0-f;
g=1.0-p;
f -= p;
q *= (b-a*p);
p=sqrt(f/g);
a=(a-b)/g;
b = -q/(g*g*p)+a*p;
}
for (;;) {
f=a;
a += (b/p);
g=e/p;
b += (f*g);
b += b;
p=g+p;
g=em;
em += qc;
if (fabs(g-qc) <= g*CA) break;
qc=sqrt(e);
qc += qc;
e=qc*em;
}
return PIO2*(b+a*em)/(em*(em+p));
}
#undef CA
#undef PIO2
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/