ccmath  2.2.1
About: A mathematics library coded in the C-language containing functions for linear algebra, numerical integration, geometry and trigonometry, curve fitting, roots and optimization, Fourier analysis, simulation generation, statistics, special functions, sorts and searches, time series models, complex arithmetic, and high precision math.
  Fossies Dox: ccmath-2.2.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

rcbes.c
Go to the documentation of this file.
1 /* rcbes.c CCMATH mathematics library source code.
2  *
3  * Copyright (C) 2000 Daniel A. Atkinson All rights reserved.
4  * This code may be redistributed under the terms of the GNU library
5  * public license (LGPL). ( See the lgpl.license file for details.)
6  * ------------------------------------------------------------------------
7  */
8 #include <math.h>
9 static double f,h,v,x;
10 static int d,ty;
11 double rcbes(void)
12 { double t;
13  if(d=='u'){
14  switch(ty){
15  case 'j':
16  case 'y': t=f*v/x-h; break;
17  case 'i': t=h-f*v/x; break;
18  case 'k': t=h+f*v/x; break; }
19  h=f; f=t; v+=1.;
20  }
21  else{
22  switch(ty){
23  case 'j':
24  case 'y': t=h*v/x-f; break;
25  case 'i': t=f+h*v/x; break;
26  case 'k': t=f-h*v/x; break; }
27  f=h; h=t; v-=1.;
28  }
29  return t;
30 }
31 void setrcb(double u,double y,int fl,int dr,double *pf,double *ph)
32 { double jbes(double u,double x),ibes(double u,double x);
33  double nbes(double u,double x),kbes(double u,double x);
34  if(dr=='d') u-=1.;
35  switch(fl){
36  case 'j': h=jbes(u,y); f=jbes(u+1.,y); break;
37  case 'y': h=nbes(u,y); f=nbes(u+1.,y); break;
38  case 'i': h=ibes(u,y); f=ibes(u+1.,y); break;
39  case 'k': h=kbes(u,y); f=kbes(u+1.,y); break;
40  }
41  x=y/2.; ty=fl; d=dr;
42  if(dr=='u'){ v=u+1.; *pf=h; *ph=f;}
43  else{ v=u; *pf=f; *ph=h;}
44 }
h
static double h
Definition: rcbes.c:9
x
static double x
Definition: rcbes.c:9
kbes
double kbes(double v, double x)
Definition: kbes.c:9
f
static double f
Definition: rcbes.c:9
rcbes
double rcbes(void)
Definition: rcbes.c:11
ibes
double ibes(double v, double x)
Definition: ibes.c:9
u
static unsigned int u
Definition: lrana.c:14
setrcb
void setrcb(double u, double y, int fl, int dr, double *pf, double *ph)
Definition: rcbes.c:31
jbes
double jbes(double v, double x)
Definition: jbes.c:9
v
static double v
Definition: rcbes.c:9
d
static int d
Definition: rcbes.c:10
ty
static int ty
Definition: rcbes.c:10
nbes
double nbes(double v, double x)
Definition: nbes.c:9