CMS 3D CMS Logo

Functions | Variables
sicif.h File Reference
#include "vdt/vdtMath.h"

Go to the source code of this file.

Functions

float p1evlf (float xx, const float *coef, int N)
 
float polevlf (float xx, const float *coef, int N)
 
int sicif (float xx, float &si, float &ci)
 

Variables

static const float CD []
 
static const float CN []
 
static const float FD4 []
 
static const float FD8 []
 
static const float FN4 []
 
static const float FN8 []
 
static const float GD4 []
 
static const float GD8 []
 
static const float GN4 []
 
static const float GN8 []
 
static const float SD []
 
static const float SN []
 

Function Documentation

float p1evlf ( float  xx,
const float *  coef,
int  N 
)
inline

Definition at line 207 of file sicif.h.

References mps_fire::i, AlCaHLTBitMon_ParallelJobs::p, x(), and geometryCSVtoXML::xx.

Referenced by sicif().

207  {
208  float ans, x;
209  const float *p;
210  int i;
211 
212  x = xx;
213  p = coef;
214  ans = x + *p++;
215  i = N-1;
216 
217  do
218  ans = ans * x + *p++;
219  while( --i );
220 
221  return( ans );
222 }
T x() const
Cartesian x coordinate.
#define N
Definition: blowfish.cc:9
float polevlf ( float  xx,
const float *  coef,
int  N 
)
inline

Definition at line 184 of file sicif.h.

References mps_fire::i, N, AlCaHLTBitMon_ParallelJobs::p, x(), and geometryCSVtoXML::xx.

Referenced by sicif().

184  {
185  float ans, x;
186  const float *p;
187  int i;
188 
189  x = xx;
190  p = coef;
191  ans = *p++;
192 
193  i = N;
194  do
195  ans = ans * x + *p++;
196  while( --i );
197 
198  return( ans );
199 }
T x() const
Cartesian x coordinate.
#define N
Definition: blowfish.cc:9
int sicif ( float  xx,
float &  si,
float &  ci 
)
inline

Definition at line 227 of file sicif.h.

References EnergyCorrector::c, CD, CN, f, myMath::fast_logf(), FD4, FD8, FN4, FN8, g, GD4, GD8, GN4, GN8, p1evlf(), polevlf(), alignCSCRings::s, SD, Validation_hcalonly_cfi::sign, SN, x(), geometryCSVtoXML::xx, and detailsBasic3DVector::z.

Referenced by VVIObjFDetails::sincosint().

227  {
228  const float MAXNUMF = 1.7014117331926442990585209174225846272e38;
229  const float PIO2F = 1.5707963267948966192;
230  // const float MACHEPF = 5.9604644775390625E-8;
231  const float EUL = 0.57721566490153286061;
232 
233  float x, z, c, s, f, g;
234  int sign;
235 
236  x = xx;
237  if( x < 0.0f )
238  {
239  sign = -1;
240  x = -x;
241  }
242  else
243  sign = 0;
244 
245 
246  if( x == 0.0f )
247  {
248  si = 0.0;
249  ci = -MAXNUMF;
250  return( 0 );
251  }
252 
253 
254  if( x > 1.0e9f )
255  {
256  float su,cu; vdt::fast_sincosf(x,su,cu);
257  si = PIO2F - cu/x;
258  ci = su/x;
259  return( 0 );
260  }
261 
262 
263 
264  if( x > 4.0f )
265  goto asympt;
266 
267  z = x * x;
268  s = x * polevlf( z, SN, 5 ) / polevlf( z, SD, 5 );
269  c = z * polevlf( z, CN, 5 ) / polevlf( z, CD, 5 );
270 
271  if( sign )
272  s = -s;
273  si = s;
274  ci = EUL + vdt::fast_logf(x) + c; /* real part if x < 0 */
275  return(0);
276 
277 
278 
279  /* The auxiliary functions are:
280  *
281  *
282  * *si = *si - PIO2;
283  * c = cos(x);
284  * s = sin(x);
285  *
286  * t = *ci * s - *si * c;
287  * a = *ci * c + *si * s;
288  *
289  * *si = t;
290  * *ci = -a;
291  */
292 
293 
294 asympt:
295  vdt::fast_sincosf(x,s,c);
296  z = 1.0f/(x*x);
297  if( x < 8.0f )
298  {
299  f = polevlf( z, FN4, 6 ) / (x * p1evlf( z, FD4, 7 ));
300  g = z * polevlf( z, GN4, 7 ) / p1evlf( z, GD4, 7 );
301  }
302  else
303  {
304  f = polevlf( z, FN8, 8 ) / (x * p1evlf( z, FD8, 8 ));
305  g = z * polevlf( z, GN8, 8 ) / p1evlf( z, GD8, 9 );
306  }
307  si = PIO2F - f * c - g * s;
308  if( sign )
309  si = -( si );
310  ci = f * s - g * c;
311 
312  return(0);
313 }
static const float FN8[]
Definition: sicif.h:115
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
float float float z
static const float GD8[]
Definition: sicif.h:170
static const float SN[]
Definition: sicif.h:59
T x() const
Cartesian x coordinate.
static const float SD[]
Definition: sicif.h:67
static const float FN4[]
Definition: sicif.h:94
float polevlf(float xx, const float *coef, int N)
Definition: sicif.h:184
double f[11][100]
static const float CD[]
Definition: sicif.h:84
static const float GD4[]
Definition: sicif.h:148
static const float GN8[]
Definition: sicif.h:159
static const float CN[]
Definition: sicif.h:76
static const float FD4[]
Definition: sicif.h:103
static const float GN4[]
Definition: sicif.h:138
float fast_logf(float x)
float p1evlf(float xx, const float *coef, int N)
Definition: sicif.h:207
static const float FD8[]
Definition: sicif.h:126

Variable Documentation

const float CD[]
static
Initial value:
= {
4.07746040061880559506E-12,
3.06780997581887812692E-9,
1.23210355685883423679E-6,
3.17442024775032769882E-4,
5.10028056236446052392E-2,
4.00000000000000000080E0,
}

Definition at line 84 of file sicif.h.

Referenced by sicif().

const float CN[]
static
Initial value:
= {
2.02524002389102268789E-11,
-1.35249504915790756375E-8,
3.59325051419993077021E-6,
-4.74007206873407909465E-4,
2.89159652607555242092E-2,
-1.00000000000000000080E0,
}

Definition at line 76 of file sicif.h.

Referenced by EcalLaserAnalyzerYousi::analyze(), and sicif().

const float FD4[]
static
Initial value:
= {
8.16496634205391016773E0,
7.30828822505564552187E0,
1.86792257950184183883E0,
1.78792052963149907262E-1,
7.01710668322789753610E-3,
1.10034357153915731354E-4,
5.48900252756255700982E-7,
}

Definition at line 103 of file sicif.h.

Referenced by sicif().

const float FD8[]
static
Initial value:
= {
9.17463611873684053703E-1,
1.78685545332074536321E-1,
1.22253594771971293032E-2,
3.58696481881851580297E-4,
4.92435064317881464393E-6,
3.21956939101046018377E-8,
9.43720590350276732376E-11,
9.70507110881952025725E-14,
}

Definition at line 126 of file sicif.h.

Referenced by sicif().

const float FN4[]
static
Initial value:
= {
4.23612862892216586994E0,
5.45937717161812843388E0,
1.62083287701538329132E0,
1.67006611831323023771E-1,
6.81020132472518137426E-3,
1.08936580650328664411E-4,
5.48900223421373614008E-7,
}

Definition at line 94 of file sicif.h.

Referenced by sicif().

const float FN8[]
static
Initial value:
= {
4.55880873470465315206E-1,
7.13715274100146711374E-1,
1.60300158222319456320E-1,
1.16064229408124407915E-2,
3.49556442447859055605E-4,
4.86215430826454749482E-6,
3.20092790091004902806E-8,
9.41779576128512936592E-11,
9.70507110881952024631E-14,
}

Definition at line 115 of file sicif.h.

Referenced by sicif().

const float GD4[]
static
Initial value:
= {
1.64402202413355338886E0,
6.66296701268987968381E-1,
9.88771761277688796203E-2,
6.22396345441768420760E-3,
1.73221081474177119497E-4,
2.02659182086343991969E-6,
7.82579218933534490868E-9,
}

Definition at line 148 of file sicif.h.

Referenced by sicif().

const float GD8[]
static
Initial value:
= {
1.68548898811011640017E0,
4.87852258695304967486E-1,
4.67913194259625806320E-2,
1.90284426674399523638E-3,
3.68475504442561108162E-5,
3.57043223443740838771E-7,
1.72693748966316146736E-9,
3.87830166023954706752E-12,
3.14040098946363335242E-15,
}

Definition at line 170 of file sicif.h.

Referenced by sicif().

const float GN4[]
static
Initial value:
= {
8.71001698973114191777E-2,
6.11379109952219284151E-1,
3.97180296392337498885E-1,
7.48527737628469092119E-2,
5.38868681462177273157E-3,
1.61999794598934024525E-4,
1.97963874140963632189E-6,
7.82579040744090311069E-9,
}

Definition at line 138 of file sicif.h.

Referenced by sicif().

const float GN8[]
static
Initial value:
= {
6.97359953443276214934E-1,
3.30410979305632063225E-1,
3.84878767649974295920E-2,
1.71718239052347903558E-3,
3.48941165502279436777E-5,
3.47131167084116673800E-7,
1.70404452782044526189E-9,
3.85945925430276600453E-12,
3.14040098946363334640E-15,
}

Definition at line 159 of file sicif.h.

Referenced by sicif().

const float SD[]
static
Initial value:
= {
2.03269266195951942049E-12,
1.27997891179943299903E-9,
4.41827842801218905784E-7,
9.96412122043875552487E-5,
1.42085239326149893930E-2,
9.99999999999999996984E-1,
}

Definition at line 67 of file sicif.h.

Referenced by sicif().

const float SN[]
static
Initial value:
= {
-8.39167827910303881427E-11,
4.62591714427012837309E-8,
-9.75759303843632795789E-6,
9.76945438170435310816E-4,
-4.13470316229406538752E-2,
1.00000000000000000302E0,
}

Definition at line 59 of file sicif.h.

Referenced by sicif().