Beispiel #1
0
TSIL_COMPLEX pi21tilde_sdL (int i, TSIL_REAL s) 
{
  int k;
  TSIL_COMPLEX result = 0.0L;
  TSIL_DATA bar;
  TSIL_RESULT gaak;
  TSIL_COMPLEX gFF,gff;
  TSIL_COMPLEX gSSFF,gSSff;

  if (arePandNsdLSet == NO) SetPandNsdL ();

  TSIL_SetParameters (&bar,0.0L,0.0L,m2_gluino,m2_gluino,0.0L,Q2);
  TSIL_Evaluate (&bar, s);
  TSIL_CopyResult (&bar, &gaak); 
  G_FF (&gaak, &gFF, &gff);

  TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_sdL[i],0.1L,m2_gluino,Q2);
  TSIL_Evaluate (&bar, s);
  TSIL_CopyResult (&bar, &gaak);
  Gtilde_SSFF (&gaak, &gSSFF, &gSSff);

  TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_sdL[i],0.01L,m2_gluino,Q2);
  TSIL_Evaluate (&bar, s);
  TSIL_CopyResult (&bar, &gaak);
  Gtilde_SSFF (&gaak, &gSSFF, &gSSff);

  TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_sdL[i],0.0L,m2_gluino,Q2);
  TSIL_Evaluate (&bar, s);
  TSIL_CopyResult (&bar, &gaak);
  Gtilde_SSFF (&gaak, &gSSFF, &gSSff);

  /* NOTE m_q = 0 for q != top */
  result += Cq*CG*(gFF + gSSFF 
		   /* - NsdL[i][i]*0.0L*m_gluino*(gff + gSSff) */
		   );

  TSIL_SetParameters (&bar,0.0L,0.0L,m2_sdL[i],m2_gluino,0.0L,Q2);
  TSIL_Evaluate (&bar, s);
  TSIL_CopyResult (&bar, &gaak);
  Gtilde_SSFF (&gaak, &gSSFF, &gSSff);

  result += (2.0L*Cq - CG)*Cq*(gSSFF
			       /* - NsdL[i][i]*0.0L*m_gluino*gSSff */
			       );

  for (k=0; k<2; k++)
    result += Cq * Cq * PsdL[i][k] * PsdL[k][i] *
      (G_S(m2_sdL[k],Q2) + Gtilde_SSS(m2_sdL[i],m2_sdL[k],Q2));

  result *= g3*g3*g3*g3;

  return result;
}
Beispiel #2
0
TSIL_COMPLEX SUMO_GetFunction (TSIL_DATA *foo, const char *which, 
			       int interp)
{
  TSIL_REAL arg1, arg2, delta, snew;
  TSIL_COMPLEX Vplus, Vminus;
  TSIL_DATA gaak;

  /* This is cut and pasted from tsil_names.h: */
  const char *vname[4][2] = {{"Vzxyv","Vzxvy"},
			     {"Vuyxv","Vuyvx"},
			     {"Vxzuv","Vxzvu"},
			     {"Vyuzv","Vyuvz"}};

  /* If no interp requested, or not a V function, just return the
     usual thing: */
  if (interp == NO || strncmp (which, "V", 1) != 0)
    return TSIL_GetFunction (foo, which);

  /* Check for a threshold case: */
  if (   !strcmp(which, vname[0][0]) || !strcmp(which, vname[0][1])
      || !strcmp(which, vname[2][0]) || !strcmp(which, vname[2][1])) {
    arg1 = foo->z; arg2 = foo->x;
  }
  else if (   !strcmp(which, vname[1][0]) || !strcmp(which, vname[1][1])
           || !strcmp(which, vname[3][0]) || !strcmp(which, vname[3][1])) {
    arg1 = foo->u; arg2 = foo->y;
  }
  else {
    printf("This can never happen!!!\n"); exit(234);
  }

  delta = foo->s/TSIL_POW(TSIL_SQRT(arg1)+TSIL_SQRT(arg2),2) - 1.0L;

  if (TSIL_FABS(delta) > THRESH_TOL)
    return TSIL_GetFunction (foo, which);

  /* If we get here we interpolate: */
  TSIL_SetParameters (&gaak, foo->x, foo->y, foo->z, foo->u, foo->v, foo->qq);
  snew = (1.0L + THRESH_TOL)*(foo->s);

  TSIL_Evaluate (&gaak, snew);
  Vplus = TSIL_GetFunction (&gaak, which);

  snew = (1.0L - THRESH_TOL)*(foo->s);
  TSIL_Evaluate (&gaak, snew);
  Vminus = TSIL_GetFunction (&gaak, which);

  return 0.5L*(1.0L + delta/THRESH_TOL)*Vplus + 
         0.5L*(1.0L - delta/THRESH_TOL)*Vminus;
}
Beispiel #3
0
int main (int argc, char *argv[])
{
  TSIL_DATA    result; /* Top-level TSIL data object */
  TSIL_REAL    qq;     /* Ensures correct basic type; see also TSIL_COMPLEX */ 
  TSIL_REAL    x, g, lambda;
  TSIL_COMPLEX pi1, pi1prime, pi2, s1, s2;
  TSIL_REAL    factor = 1.0L/(16.0L*PI*PI);

  /* If incorrect number of args, print message on stderr and exit: */
  if (argc != 5)
    TSIL_Error("main", "Expected 4 arguments: m^2, g, lambda, and Q^2", 1);

  /* Note cast to appropriate floating-point type for safety */
  x      = (TSIL_REAL) strtold(argv[1], (char **) NULL); 
  g      = (TSIL_REAL) strtold(argv[2], (char **) NULL);
  lambda = (TSIL_REAL) strtold(argv[3], (char **) NULL); 
  qq     = (TSIL_REAL) strtold(argv[4], (char **) NULL); 

  /* All loop integrals have a common squared-mass argument x: */
  TSIL_SetParameters (&result, x, x, x, x, x, qq); 

  /* For the pole mass calculation, evaluate two-loop integrals at s = x: */
  TSIL_Evaluate (&result, x);

  /* Assemble one- and two-loop mass squared results: */
  pi1 = 0.5L*lambda*TSIL_A(x,qq) - 0.5L*g*g*TSIL_B(x,x,x,qq);

  pi1prime = -0.5L*g*g*TSIL_dBds(x, x, x, qq); 

  pi2 = - 0.5L*g*g*g*g*TSIL_GetFunction(&result, "M")
        - 0.5L*g*g*g*g*TSIL_GetFunction(&result, "Vzxyv")
               + g*g*g*TSIL_GetFunction(&result, "Uzxyv")
    - (1.0L/6.0L)*lambda*lambda*TSIL_GetFunction(&result, "Svyz")
    + 0.25L*lambda*g*g*TSIL_POW(TSIL_GetFunction(&result, "Bxz"), 2)
    + 0.25L*lambda*lambda*TSIL_A(x,qq)*(TSIL_A(x,qq)/x + 1.0L)   
    - 0.5L*lambda*g*g*TSIL_A(x,qq)*TSIL_Bp(x, x, x, qq)      
    - 0.25L*lambda*g*g*TSIL_I2p(x,x,x,qq);               

  s1 = x + factor*pi1;
  s2 = x + factor*pi1 + factor*factor*(pi2 + pi1*pi1prime);

  printf("Tree-level squared mass:    %lf\n", (double) x); 
  printf("One-loop pole squared mass: %lf\n", (double) s1); 
  printf("Two-loop pole squared mass: %lf\n", (double) s2); 

  return 0;
}
Beispiel #4
0
TSIL_COMPLEX pi20_sdL (int i, int j, TSIL_REAL s) 
{
  int k,m,n,r,t;
  TSIL_COMPLEX result = 0.0L;
  TSIL_COMPLEX term = 0.0L;
  TSIL_DATA bar;
  TSIL_RESULT gaak,gaak2;
  TSIL_COMPLEX vFFFFS, vFffFS, vfFfFS, vfFFfS, vFFffS, vffffS;
  TSIL_COMPLEX mFFFFS, mFFffS, mFfFfS, mFffFS, mffffS;
  TSIL_COMPLEX sSSS;

  if (arePandNsdLSet == NO) SetPandNsdL ();

  /* 0502168 eq. (4.8), term by term: */
  for (k=0; k<2; k++)
    for (m=0; m<2; m++)
      for (n=0; n<2; n++)
	term += PsdL[i][k] * PsdL[k][m] * PsdL[m][n] * PsdL[n][j] *
	  X_SSS (m2_sdL[k],m2_sdL[n],m2_sdL[m],Q2);

  result += 0.25L*term;

  term = 0.0L;
  for (k=0; k<2; k++)
    term += PsdL[i][k] * PsdL[k][j] *
      W_SSFF (m2_sdL[k],m2_sdL[k],0.0L,m2_gluino,Q2);

  /* NOTE m_q = 0 for q != top */

  /* for (k=0; k<2; k++) */
  /*   for (m=0; m<2; m++) { */
  /*     term += -PsdL[i][k] * NsdL[k][m] * PsdL[m][j] * 0.0L * m_gluino * */
  /* 	W_SSff (m2_sdL[k],m2_sdL[m],0.0L,m2_gluino,Q2); */
  /*   } */
  result += 0.5*term;

  /* Now term will be the second part, multiplied by (4Cq^2 - 2CG Cq): */
  term = 0.0L;

  for (k=0; k<2; k++) {
    TSIL_SetParameters (&bar,m2_gluino,0.0L,0.0L,m2_gluino,m2_sdL[k],Q2);
    TSIL_Evaluate (&bar, s);
    TSIL_CopyResult (&bar, &gaak); 
    V_FFFFS (&gaak, &gaak, 
	     &vFFFFS, &vFffFS, &vfFfFS, &vfFFfS, &vFFffS, &vffffS);

    result += (LsdL[i] * LsdLc[j] * LsdL[k] * LsdLc[k] + 
	       RsdL[i] * RsdLc[j] * RsdL[k] * RsdLc[k]) * vFFFFS
      + (LsdL[i] * RsdLc[j] * RsdL[k] * LsdLc[k] + 
	 RsdL[i] * LsdLc[j] * LsdL[k] * RsdLc[k]) * m2_gluino * vfFFfS
      /* + (LsdL[i] * LsdLc[j] * RsdL[k] * RsdLc[k] +  */
      /* 	 RsdL[i] * RsdLc[j] * LsdL[k] * LsdLc[k]) * 0.0L * vFffFS */
      /* - NsdL[i][j] * 0.0L * m_gluino * vfFfFS */
      /* + (LsdL[i] * RsdLc[j] * LsdL[k] * RsdLc[k] +  */
      /* 	 RsdL[i] * LsdLc[j] * RsdL[k] * LsdLc[k]) * 0.0L * m2_gluino * vffffS */
      ;

    /* if (i==j) */
    /*   result += -NsdL[k][k] * 0.0L * m_gluino * vFFffS; */

    TSIL_PermuteResult (&gaak, XYandZU, &gaak2);
    M_FFFFS (&gaak2, &mFFFFS, &mFFffS, &mFfFfS, &mFffFS, &mffffS);

    term += (LsdL[i] * RsdLc[j] * RsdL[k] * LsdLc[k] + 
	     RsdL[i] * LsdLc[j] * LsdL[k] * RsdLc[k]) * mFFFFS
      /* - NsdL[i][j] * 0.0L * m_gluino * mFFffS */
      + (LsdL[i] * LsdLc[j] * LsdL[k] * LsdLc[k]
      + RsdL[i] * RsdLc[j] * RsdL[k] * RsdLc[k]) * m2_gluino * mFffFS
      /* + (LsdL[i] * RsdLc[j] * LsdL[k] * RsdLc[k] +  */
      /* 	 RsdL[i] * LsdLc[j] * RsdL[k] * LsdLc[k]) * 0.0L * m2_gluino * mffffS */
      ;

    /* if (i==j) */
    /*   term += -NsdL[k][k] * 0.0L * m_gluino * mFfFfS; */

    /* M_FFFFS (&gaak, &mFFFFS, &mFFffS, &mFfFfS, &mFffFS, &mffffS); */
    /* term += (LsdL[i] * LsdLc[j] * RsdL[k] * RsdLc[k] +  */
    /* 	     RsdL[i] * RsdLc[j] * LsdL[k] * LsdLc[k]) * 0.0L * mFffFS; */

    for (m=0; m<2; m++)
      for (n=0; n<2; n++) {
	TSIL_SetParametersST (&bar,m2_sdL[k],m2_sdL[m],m2_sdL[n],Q2);
	TSIL_Evaluate (&bar, s);
	/* For clarity (we just need this one function): */
	sSSS = -bar.S[uxv].value;
	term += 0.25L * PsdL[i][k] * PsdL[k][m] * PsdL[m][n] * PsdL[n][j] * sSSS;
      }
  }
  result *= 4.0L*Cq*Cq;
  result += term*(4.0L*Cq*Cq - 2.0L*CG*Cq);

  /* Next bit is last three lines of eq. (4.8).  These involve summing
     over all 12 quark/squark mass eigenstates. */

  term = 0.0L;

  /* stop */
  for (r=0; r<2; r++) {

    TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_gluino,m2_top,m2_stop[r],Q2);
    TSIL_Evaluate (&bar, s);
    TSIL_CopyResult (&bar, &gaak); 
    V_FFFFS (&gaak, &gaak, &vFFFFS, &vFffFS, &vfFfFS, &vfFFfS, &vFFffS, &vffffS);

    term += -2.0L * NsdL[i][j] * m_top * m_gluino * vfFfFS
      + NsdL[i][j] * NsdL[r][r] * 0.0L * m_top * (vfFFfS + m2_gluino*vffffS);

    if (i == j)
      term += vFFFFS + m2_gluino*vFffFS - 2.0L*NsdL[r][r]*m_top*m_gluino*vFFffS;

    for (k=0; k<2; k++)
      for (t=0; t<2; t++) {
        TSIL_SetParametersST (&bar,m2_sdL[k],m2_stop[r],m2_stop[t],Q2);
        TSIL_Evaluate (&bar, s);
        /* For clarity (just need this one function): */
        sSSS = -bar.S[uxv].value;
	term += 0.25L * PsdL[i][k] * PsdL[k][j] * PsdL[r][t] * PsdL[t][r] * sSSS;
      }
  }

  /* sbot */
  for (r=0; r<2; r++) {

    TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_gluino,m2_bot,m2_sbot[r],Q2);
    TSIL_Evaluate (&bar, s);
    TSIL_CopyResult (&bar, &gaak); 
    V_FFFFS (&gaak, &gaak, 
	     &vFFFFS, &vFffFS, &vfFfFS, &vfFFfS, &vFFffS, &vffffS);

    /* Take mbot ~ 0 */
    /* term += -2.0L*NsdL[i][j]*m_bot*m_gluino*vfFfFS */
    /*   + NsdL[i][j]*NsdL[r][r]*0.0L*m_bot*(vfFFfS + m2_gluino*vffffS) */
    ;

    if (i == j)
      term += vFFFFS + m2_gluino*vFffFS 
	/* - 2.0L*NsdL[r][r]*m_bot*m_gluino*vFFffS */
	;

    for (k=0; k<2; k++)
      for (t=0; t<2; t++) {
        TSIL_SetParametersST (&bar,m2_sdL[k],m2_sbot[r],m2_sbot[t],Q2);
        TSIL_Evaluate (&bar, s);
        /* For clarity (just need this one function): */
        sSSS = -bar.S[uxv].value;
	term += 0.25L * PsdL[i][k] * PsdL[k][j] * PsdL[r][t] * PsdL[t][r] * sSSS;
      }
  }

  /* sdL */
  for (r=0; r<2; r++) {

    TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_gluino,0.0L,m2_sdL[r],Q2);
    TSIL_Evaluate (&bar, s);
    TSIL_CopyResult (&bar, &gaak); 
    V_FFFFS (&gaak, &gaak, 
	     &vFFFFS, &vFffFS, &vfFfFS, &vfFFfS, &vFFffS, &vffffS);

    /* Tese terms are all zero since the fermion mass is zero */
    /* term = -2.0L*NsdL[i][j]* 0.0L *m_gluino*vfFfFS */
    /*   + NsdL[i][j]*NsdL[r][r]*0.0L* 0.0L *(vfFFfS + m2_gluino*vffffS); */

    if (i == j)
      term += vFFFFS + m2_gluino*vFffFS 
	/* - 2.0L*NsdL[r][r]* 0.0L *m_gluino*vFFffS */
	;

    for (k=0; k<2; k++)
      for (t=0; t<2; t++) {
        TSIL_SetParametersST (&bar,m2_sdL[k],m2_sdL[r],m2_sdL[t],Q2);
        TSIL_Evaluate (&bar, s);
        /* For clarity (just need this one function): */
        sSSS = -bar.S[uxv].value;
	term += 0.25L * PsdL[i][k] * PsdL[k][j] * PsdL[r][t] * PsdL[t][r] * sSSS;
      }
  }

  /* suR */
  for (r=0; r<2; r++) {

    TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_gluino,0.0L,m2_suR[r],Q2);
    TSIL_Evaluate (&bar, s);
    TSIL_CopyResult (&bar, &gaak); 
    V_FFFFS (&gaak, &gaak, 
	     &vFFFFS, &vFffFS, &vfFfFS, &vfFFfS, &vFFffS, &vffffS);

    /* Tese terms are all zero since the fermion mass is zero */
    /* term = -2.0L*NsdL[i][j]* 0.0L *m_gluino*vfFfFS */
    /*   + NsdL[i][j]*NsdL[r][r]*0.0L* 0.0L *(vfFFfS + m2_gluino*vffffS); */

    if (i == j)
      term += vFFFFS + m2_gluino*vFffFS 
	/* - 2.0L*NsdL[r][r]* 0.0L *m_gluino*vFFffS */
	;

    for (k=0; k<2; k++)
      for (t=0; t<2; t++) {
        TSIL_SetParametersST (&bar,m2_sdL[k],m2_suR[r],m2_suR[t],Q2);
        TSIL_Evaluate (&bar, s);
        /* For clarity (just need this one function): */
        sSSS = -bar.S[uxv].value;
	term += 0.25L * PsdL[i][k] * PsdL[k][j] * PsdL[r][t] * PsdL[t][r] * sSSS;
      }
  }

  /* sdL */
  for (r=0; r<2; r++) {

    TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_gluino,0.0L,m2_sdL[r],Q2);
    TSIL_Evaluate (&bar, s);
    TSIL_CopyResult (&bar, &gaak); 
    V_FFFFS (&gaak, &gaak, 
	     &vFFFFS, &vFffFS, &vfFfFS, &vfFFfS, &vFFffS, &vffffS);

    /* Tese terms are all zero since the fermion mass is zero */
    /* term = -2.0L*NsdL[i][j]* 0.0L *m_gluino*vfFfFS */
    /*   + NsdL[i][j]*NsdL[r][r]*0.0L* 0.0L *(vfFFfS + m2_gluino*vffffS); */

    if (i == j)
      term += vFFFFS + m2_gluino*vFffFS 
	/* - 2.0L*NsdL[r][r]* 0.0L *m_gluino*vFFffS */
	;

    for (k=0; k<2; k++)
      for (t=0; t<2; t++) {
        TSIL_SetParametersST (&bar,m2_sdL[k],m2_sdL[r],m2_sdL[t],Q2);
        TSIL_Evaluate (&bar, s);
        /* For clarity (just need this one function): */
        sSSS = -bar.S[uxv].value;
	term += 0.25L * PsdL[i][k] * PsdL[k][j] * PsdL[r][t] * PsdL[t][r] * sSSS;
      }
  }

  /* sdR */
  for (r=0; r<2; r++) {

    TSIL_SetParameters (&bar,0.0L,m2_gluino,m2_gluino,0.0L,m2_sdR[r],Q2);
    TSIL_Evaluate (&bar, s);
    TSIL_CopyResult (&bar, &gaak); 
    V_FFFFS (&gaak, &gaak, 
	     &vFFFFS, &vFffFS, &vfFfFS, &vfFFfS, &vFFffS, &vffffS);

    /* Tese terms are all zero since the fermion mass is zero */
    /* term = -2.0L*NsdL[i][j]* 0.0L *m_gluino*vfFfFS */
    /*   + NsdL[i][j]*NsdL[r][r]*0.0L* 0.0L *(vfFFfS + m2_gluino*vffffS); */

    if (i == j)
      term += vFFFFS + m2_gluino*vFffFS 
	/* - 2.0L*NsdL[r][r]* 0.0L *m_gluino*vFFffS */
	;

    for (k=0; k<2; k++)
      for (t=0; t<2; t++) {
        TSIL_SetParametersST (&bar,m2_sdL[k],m2_sdR[r],m2_sdR[t],Q2);
        TSIL_Evaluate (&bar, s);
        /* For clarity (just need this one function): */
        sSSS = -bar.S[uxv].value;
	term += 0.25L * PsdL[i][k] * PsdL[k][j] * PsdL[r][t] * PsdL[t][r] * sSSS;
      }
  }
  result += 4.0L*Cq*Iq*term;

  result *= g3*g3*g3*g3;
  /* End of eq. (4.8) */

  return result;
}
Beispiel #5
0
int main (int argc, char *argv[])
{
#include "tsil_names.h"

    TSIL_REAL x, y, z, u, v, s, qq;
    TSIL_COMPLEX val;
    TSIL_DATA result;
    int i, j, k, p, foo, tally[3], nwarn, nfail, npass;
    char c;
    TSIL_COMPLEX Mvalue, Uvalue[4], Vvalue[4], Svalue[2], Tvalue[6], Bvalue[2];
    TSIL_COMPLEX Tbarvalue[6], UUvalue[4][3], VVvalue[4][3], SSvalue[2][3];
    TSIL_COMPLEX TTvalue[6][3];
    TSIL_REAL xx, yy, zz, uu, vv;

    /* gcc complains unless the following are initialized; this may be a
       gcc bug? Fortunately, it doesn't hurt to initialize them. */
    int permU = 0;
    int permS = 0;
    int permT11 = 0;
    int permT12 = 0;
    int permT21 = 0;
    int permT22 = 0;
    int permT31 = 0;
    int permT32 = 0;

    if (argc == 1)
        TSIL_Error ("main", "Must supply test data filename(s)...", 2);

    nwarn = nfail = npass = 0;

    printf("===== TSIL TEST SUITE =====\n");
#if defined (TSIL_TEST_STU)
    printf("** Testing STU Evaluation only!\n");
#elif defined (TSIL_TEST_ST)
    printf("** Testing ST Evaluation only!\n");
#endif

    /* We don't need no stinkin' TSIL_Warnings here. */
    fclose (stderr);

    /* Loop over input files */
    for (i = 1; i < argc; i++)
    {
        if ((fp = fopen(argv[i], "r")) == NULL) {
            TSIL_Warn ("Test program", "Invalid file name");
            continue;
        }

        printf ("\nTest %d: ", i);
        printf ("%s\n", argv[i]);
        fflush (stdout);

        /* Skip any lines starting with '(' (comments): */
        while ((c = fgetc (fp)) == '(')
            SkipLine (fp);

        /* Put back the last character after we find a non-comment line */
        ungetc ((int) c, fp);

        /* Read in parameters */
        xx = x = GetReal ();
        yy = y = GetReal ();
        zz = z = GetReal ();
        uu = u = GetReal ();
        vv = v = GetReal ();
        s  = GetReal ();
        qq = GetReal ();

        /* Calculate everything... */
#if defined(TSIL_TEST_STU)
        TSIL_SetParametersSTU (&result, x, z, u, v, qq);
#elif defined(TSIL_TEST_ST)
        TSIL_SetParametersST (&result, x, u, v, qq);
#else
        TSIL_SetParameters (&result, x, y, z, u, v, qq);
#endif
        TSIL_Evaluate (&result, s);

        for (j = 0; j < 3; j++)
            tally[j] = 0;


        /* ...and test results: */

#if defined(TSIL_TEST_STU)
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* U */
        for (j = 2; j < 4; j+=2)
        {
            val = GetComplex ();
            Uvalue[j] = result.U[j].value;
            TSIL_Compare (uname[j], val, Uvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }
        CheckConsistent (Uvalue[2], TSIL_GetFunction(&result,"Uxzuv"));

        val = GetComplex ();
        val = GetComplex ();
        /* T */
        for (j = 1; j < 6; j+=2)
        {
            val = GetComplex ();
            Tvalue[j] = result.T[j].value;
            TSIL_Compare (tname[j], val, Tvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
            val = GetComplex ();
        }
        CheckConsistent (Tvalue[1], TSIL_GetFunction(&result,"Tuxv"));
        CheckConsistent (Tvalue[3], TSIL_GetFunction(&result,"Txuv"));
        CheckConsistent (Tvalue[5], TSIL_GetFunction(&result,"Tvxu"));

        /* S */
        for (j = 1; j < 2; j+=2)
        {
            val = GetComplex ();
            Svalue[j] = result.S[j].value;
            TSIL_Compare (sname[j], val, Svalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }
        CheckConsistent (Svalue[1], TSIL_GetFunction(&result,"Suxv"));

        /* B */
        for (j = 0; j < 2; j+=2)
        {
            val = GetComplex ();
            Bvalue[j] = result.B[j].value;
            TSIL_Compare (bname[j], val, Bvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }
        CheckConsistent (Bvalue[0], TSIL_GetFunction(&result,"Bxz"));

        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* V */
        for (j = 2; j < 4; j+=2)
        {
            val = GetComplex ();
            Vvalue[j] = result.V[j].value;
            TSIL_Compare (vname[j], val, Vvalue[j], TSIL_PASS_V, TSIL_WARN_V, &foo);
            tally[foo]++;
        }
        CheckConsistent (Vvalue[2], TSIL_GetFunction(&result,"Vxzuv"));
        val = GetComplex ();

        /* Tbar */
        val = GetComplex ();
        for (j = 1; j < 6; j+=2)
        {
            val = GetComplex ();
            Tbarvalue[j] = result.Tbar[j].value;
            TSIL_Compare (tbarname[j], val, Tbarvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
            val = GetComplex ();
        }

        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* UU */
        for (j = 2; j < 4; j+=2)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                UUvalue[j][k] = result.U[j].bold[k];
                TSIL_Compare (uuname[j][k], val, UUvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;
            }
        }

        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* VV */
        for (j = 2; j < 4; j+=2)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                VVvalue[j][k] = result.V[j].bold[k];
                TSIL_Compare (vvname[j][k], val, VVvalue[j][k], TSIL_PASS_V, TSIL_WARN_V, &foo);
                tally[foo]++;
            }
        }
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();

        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* TT */
        for (j = 1; j < 6; j+=2)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                TTvalue[j][k] = result.T[j].bold[k];
                TSIL_Compare (ttname[j][k], val, TTvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;
            }
            val = GetComplex ();
            val = GetComplex ();
            val = GetComplex ();
        }

        /* SS */
        for (j = 1; j < 2; j+=2)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                SSvalue[j][k] = result.S[j].bold[k];
                TSIL_Compare (ssname[j][k], val, SSvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;
            }
        }
#elif defined(TSIL_TEST_ST)
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* U */
        for (j = 2; j < 4; j+=2)
        {
            val = GetComplex ();
        }

        val = GetComplex ();
        val = GetComplex ();
        /* T */
        for (j = 1; j < 6; j+=2)
        {
            val = GetComplex ();
            Tvalue[j] = result.T[j].value;
            TSIL_Compare (tname[j], val, Tvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
            val = GetComplex ();
        }
        CheckConsistent (Tvalue[1], TSIL_GetFunction(&result,"Tuxv"));
        CheckConsistent (Tvalue[3], TSIL_GetFunction(&result,"Txuv"));
        CheckConsistent (Tvalue[5], TSIL_GetFunction(&result,"Tvxu"));

        /* S */
        for (j = 1; j < 2; j+=2)
        {
            val = GetComplex ();
            Svalue[j] = result.S[j].value;
            TSIL_Compare (sname[j], val, Svalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }
        CheckConsistent (Svalue[1], TSIL_GetFunction(&result,"Suxv"));

        /* B */
        for (j = 0; j < 2; j+=2)
        {
            val = GetComplex ();
        }

        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* V */
        for (j = 2; j < 4; j+=2)
        {
            val = GetComplex ();
        }
        val = GetComplex ();

        /* Tbar */
        val = GetComplex ();
        for (j = 1; j < 6; j+=2)
        {
            val = GetComplex ();
            Tbarvalue[j] = result.Tbar[j].value;
            TSIL_Compare (tbarname[j], val, Tbarvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
            val = GetComplex ();
        }

        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* UU */
        for (j = 2; j < 4; j+=2)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
            }
        }

        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* VV */
        for (j = 2; j < 4; j+=2)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
            }
        }
        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();

        val = GetComplex ();
        val = GetComplex ();
        val = GetComplex ();
        /* TT */
        for (j = 1; j < 6; j+=2)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                TTvalue[j][k] = result.T[j].bold[k];
                TSIL_Compare (ttname[j][k], val, TTvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;
            }
            val = GetComplex ();
            val = GetComplex ();
            val = GetComplex ();
        }

        /* SS */
        for (j = 1; j < 2; j+=2)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                SSvalue[j][k] = result.S[j].bold[k];
                TSIL_Compare (ssname[j][k], val, SSvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;
            }
        }
#else
        /* M */
        val = GetComplex ();
        Mvalue = result.M.value;
        CheckConsistent (Mvalue, TSIL_GetFunction(&result,"M"));
        TSIL_Compare ("M", val, Mvalue, TSIL_PASS, TSIL_WARN, &foo);
        tally[foo]++;

        /* U */
        for (j = 0; j < 4; j++)
        {
            val = GetComplex ();
            Uvalue[j] = result.U[j].value;
            TSIL_Compare (uname[j], val, Uvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }
        CheckConsistent (Uvalue[0], TSIL_GetFunction(&result,"Uzxyv"));
        CheckConsistent (Uvalue[1], TSIL_GetFunction(&result,"Uuyxv"));
        CheckConsistent (Uvalue[2], TSIL_GetFunction(&result,"Uxzuv"));
        CheckConsistent (Uvalue[3], TSIL_GetFunction(&result,"Uyuzv"));

        /* T */
        for (j = 0; j < 6; j++)
        {
            val = GetComplex ();
            Tvalue[j] = result.T[j].value;
            TSIL_Compare (tname[j], val, Tvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }
        CheckConsistent (Tvalue[0], TSIL_GetFunction(&result,"Tvyz"));
        CheckConsistent (Tvalue[1], TSIL_GetFunction(&result,"Tuxv"));
        CheckConsistent (Tvalue[2], TSIL_GetFunction(&result,"Tyzv"));
        CheckConsistent (Tvalue[3], TSIL_GetFunction(&result,"Txuv"));
        CheckConsistent (Tvalue[4], TSIL_GetFunction(&result,"Tzyv"));
        CheckConsistent (Tvalue[5], TSIL_GetFunction(&result,"Tvxu"));

        /* S */
        for (j = 0; j < 2; j++)
        {
            val = GetComplex ();
            Svalue[j] = result.S[j].value;
            TSIL_Compare (sname[j], val, Svalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }
        CheckConsistent (Svalue[0], TSIL_GetFunction(&result,"Svyz"));
        CheckConsistent (Svalue[1], TSIL_GetFunction(&result,"Suxv"));

        /* B */
        for (j = 0; j < 2; j++)
        {
            val = GetComplex ();
            Bvalue[j] = result.B[j].value;
            TSIL_Compare (bname[j], val, Bvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }
        CheckConsistent (Bvalue[0], TSIL_GetFunction(&result,"Bxz"));
        CheckConsistent (Bvalue[1], TSIL_GetFunction(&result,"Byu"));

        /* V */
        for (j = 0; j < 4; j++)
        {
            val = GetComplex ();
            Vvalue[j] = result.V[j].value;
            TSIL_Compare (vname[j], val, Vvalue[j], TSIL_PASS_V, TSIL_WARN_V, &foo);
            tally[foo]++;
        }
        CheckConsistent (Vvalue[0], TSIL_GetFunction(&result,"Vzxyv"));
        CheckConsistent (Vvalue[1], TSIL_GetFunction(&result,"Vuyxv"));
        CheckConsistent (Vvalue[2], TSIL_GetFunction(&result,"Vxzuv"));
        CheckConsistent (Vvalue[3], TSIL_GetFunction(&result,"Vyuzv"));

        /* Tbar */
        for (j = 0; j < 6; j++)
        {
            val = GetComplex ();
            Tbarvalue[j] = result.Tbar[j].value;
            TSIL_Compare (tbarname[j], val, Tbarvalue[j], TSIL_PASS, TSIL_WARN, &foo);
            tally[foo]++;
        }

        /* UU */
        for (j = 0; j < 4; j++)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                UUvalue[j][k] = result.U[j].bold[k];
                TSIL_Compare (uuname[j][k], val, UUvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;
            }
        }

        /* VV */
        for (j = 0; j < 4; j++)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                VVvalue[j][k] = result.V[j].bold[k];
                TSIL_Compare (vvname[j][k], val, VVvalue[j][k], TSIL_PASS_V, TSIL_WARN_V, &foo);
                tally[foo]++;
            }
        }

        /* TT */
        for (j = 0; j < 6; j++)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                TTvalue[j][k] = result.T[j].bold[k];
                TSIL_Compare (ttname[j][k], val, TTvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;
            }
        }

        /* SS */
        for (j = 0; j < 2; j++)
        {
            for (k = 0; k < 3; k++)
            {
                val = GetComplex ();
                SSvalue[j][k] = result.S[j].bold[k];
                TSIL_Compare (ssname[j][k], val, SSvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;
            }
        }
#endif

        if (tally[FAIL] > 0)
        {
            nfail++;
            printf ("FAILED FOR INPUT PARAMETERS:\n");
            printf ("x = %.6lf;\n", (double) x);
            printf ("y = %.6lf;\n", (double) y);
            printf ("z = %.6lf;\n", (double) z);
            printf ("u = %.6lf;\n", (double) u);
            printf ("v = %.6lf;\n", (double) v);
            printf ("s = %.6lf;\n", (double) s);
            printf ("qq = %.6lf;\n", (double) qq);
        }
        else if (tally[WARN] > 0)
        {
            printf ("PASS WITH WARNING\n");
            nwarn++;
        }
        else
        {
            printf ("PASS\n");
            npass++;
        }

        if (1 == Doperms)
        {
            for (p = 0; p < 4; p++)
            {
                for (j = 0; j < 3; j++)
                    tally[j] = 0;

                x = xx;
                y = yy;
                z = zz;
                u = uu;
                v = vv;

                if (1 == p)
                {
                    swapR (&x, &y);
                    swapR (&z, &u);
                }

                if (2 == p)
                {
                    swapR (&x, &z);
                    swapR (&y, &u);
                }

                if (3 == p)
                {
                    swapR (&x, &u);
                    swapR (&y, &z);
                }

                /* Calculate everything... */
                TSIL_SetParameters (&result, x, y, z, u, v, qq);
                TSIL_Evaluate (&result, s);

                Permuteresults (&result, p);

                printf ("\nTest %d, permutation %d (", i, p);
                printf ("%s", argv[i]);
                printf ("): ");

                /* ...and check that permuted results agree as they
                       should: */

                /* M */
                val = result.M.value;
                TSIL_Compare ("M", val, Mvalue, TSIL_PASS, TSIL_WARN, &foo);
                tally[foo]++;

                /* U */
                for (j = 0; j < 4; j++)
                {
                    val = result.U[j].value;
                    TSIL_Compare (uname[j], val, Uvalue[j], TSIL_PASS, TSIL_WARN, &foo);
                    tally[foo]++;
                }

                /* T */
                for (j = 0; j < 6; j++)
                {
                    val = result.T[j].value;
                    TSIL_Compare (tname[j], val, Tvalue[j], TSIL_PASS, TSIL_WARN, &foo);
                    tally[foo]++;
                }

                /* S */
                for (j = 0; j < 2; j++)
                {
                    val = result.S[j].value;
                    TSIL_Compare (sname[j], val, Svalue[j], TSIL_PASS, TSIL_WARN, &foo);
                    tally[foo]++;
                }

                /* B */
                for (j = 0; j < 2; j++)
                {
                    val = result.B[j].value;
                    TSIL_Compare (bname[j], val, Bvalue[j], TSIL_PASS, TSIL_WARN, &foo);
                    tally[foo]++;
                }

                /* V */
                for (j = 0; j < 4; j++)
                {
                    val = result.V[j].value;
                    TSIL_Compare (vname[j], val, Vvalue[j], TSIL_PASS_V, TSIL_WARN_V, &foo);
                    tally[foo]++;
                }

                /* Tbar */
                for (j = 0; j < 6; j++)
                {
                    val = result.Tbar[j].value;
                    TSIL_Compare (tbarname[j], val, Tbarvalue[j], TSIL_PASS, TSIL_WARN, &foo);
                    tally[foo]++;
                }

                /* UU */
                for (j = 0; j < 4; j++)
                {
                    for (k = 0; k < 3; k++)
                    {
                        val = result.U[j].bold[k];
                        TSIL_Compare (uuname[j][k], val, UUvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                }

                /* VV */
                for (j = 0; j < 4; j++)
                {
                    for (k = 0; k < 3; k++)
                    {
                        val = result.V[j].bold[k];
                        TSIL_Compare (vvname[j][k], val, VVvalue[j][k], TSIL_PASS_V, TSIL_WARN_V, &foo);
                        tally[foo]++;
                    }
                }

                /* TT */
                for (j = 0; j < 6; j++)
                {
                    for (k = 0; k < 3; k++)
                    {
                        val = result.T[j].bold[k];
                        TSIL_Compare (ttname[j][k], val, TTvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                }

                /* SS */
                for (j = 0; j < 2; j++)
                {
                    for (k = 0; k < 3; k++)
                    {
                        val = result.S[j].bold[k];
                        TSIL_Compare (ssname[j][k], val, SSvalue[j][k], TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                }

                if (tally[FAIL] > 0)
                {
                    nfail++;
                    printf ("\nFAILED FOR INPUT PARAMETERS:\n");
                    printf ("x = %.3lf;\n", (double) x);
                    printf ("y = %.3lf;\n", (double) y);
                    printf ("z = %.3lf;\n", (double) z);
                    printf ("u = %.3lf;\n", (double) u);
                    printf ("v = %.3lf;\n", (double) v);
                    printf ("s = %.3lf;\n", (double) s);
                    printf ("qq = %.3lf;\n", (double) qq);
                }
                else if (tally[WARN] > 0)
                {
                    nwarn++;
                    printf ("\nPASS WITH WARNING\n");
                }
                else
                {
                    printf ("\nPASS\n");
                    npass++;
                }
            }
        }

        if (1 == Doextraperms)
        {
            for (p = 4; p < 8; p++)
            {
                x = xx;
                y = yy;
                z = zz;
                u = uu;
                v = vv;

                if (p == 4)
                {
                    swapR (&x, &v);
                    permU = 1;
                    permT11 = 1;
                    permT12 = 1;
                    permT21 = 3;
                    permT22 = 5;
                    permT31 = 5;
                    permT32 = 3;
                    permS = 1;
                }
                if (p == 5)
                {
                    swapR (&y, &v);
                    permU = 0;
                    permT11 = 0;
                    permT12 = 2;
                    permT21 = 2;
                    permT22 = 0;
                    permT31 = 4;
                    permT32 = 4;
                    permS = 0;
                }
                if (p == 6)
                {
                    swapR (&z, &v);
                    permU = 3;
                    permT11 = 0;
                    permT12 = 4;
                    permT21 = 4;
                    permT22 = 0;
                    permT31 = 2;
                    permT32 = 2;
                    permS = 0;
                }
                if (p == 7)
                {
                    swapR (&u, &v);
                    permU = 2;
                    permT11 = 1;
                    permT12 = 5;
                    permT21 = 5;
                    permT22 = 1;
                    permT31 = 3;
                    permT32 = 3;
                    permS = 1;
                }

                for (j = 0; j < 3; j++)
                    tally[j] = 0;

                /* Calculate everything... */
                TSIL_SetParameters (&result, x, y, z, u, v, qq);
                TSIL_Evaluate (&result, s);

                printf ("\nTest %d, permutation %d (", i, p);
                printf ("%s", argv[i]);
                printf ("): ");

                /* ...and check results: */

                /* U */
                for (j = 0; j < 4; j++)
                {
                    val = Uvalue[j];
                    if (j == permU)
                    {
                        TSIL_Compare (uname[j], val, result.U[j].value, TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                }

                /* T */
                for (j = 0; j < 6; j++)
                {
                    val = Tvalue[j];
                    if (j == permT11)
                    {
                        TSIL_Compare (tname[j], val, result.T[permT12].value,
                                      TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                    if (j == permT21)
                    {
                        TSIL_Compare (tname[j], val, result.T[permT22].value,
                                      TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                    if (j == permT31)
                    {
                        TSIL_Compare (tname[j], val, result.T[permT32].value,
                                      TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                }

                /* S */
                for (j = 0; j < 2; j++)
                {
                    val = Svalue[j];
                    if (j == permS)
                    {
                        TSIL_Compare (sname[j], val, result.S[j].value,
                                      TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                }

                /* V */
                for (j = 0; j < 4; j++)
                {
                    val = Vvalue[j];
                    if (j == permU)
                    {
                        TSIL_Compare (vname[j], val, result.V[j].value,
                                      TSIL_PASS_V, TSIL_WARN_V, &foo);
                        tally[foo]++;
                    }
                }

                /* Tbar */
                for (j = 0; j < 6; j++)
                {
                    val = Tbarvalue[j];
                    if (j == permT11)
                    {
                        TSIL_Compare (tbarname[j], val, result.Tbar[permT12].value,
                                      TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                    if (j == permT21)
                    {
                        TSIL_Compare (tbarname[j], val, result.Tbar[permT22].value,
                                      TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                    if (j == permT31)
                    {
                        TSIL_Compare (tbarname[j], val, result.Tbar[permT32].value,
                                      TSIL_PASS, TSIL_WARN, &foo);
                        tally[foo]++;
                    }
                }

                /* UU */
                for (j = 0; j < 4; j++)
                {
                    for (k = 0; k < 3; k++)
                    {
                        val = UUvalue[j][k];
                        if (j == permU)
                        {
                            TSIL_Compare (uuname[j][k], val, result.U[j].bold[k],
                                          TSIL_PASS, TSIL_WARN, &foo);
                            tally[foo]++;
                        }
                    }
                }

                /* VV */
                for (j = 0; j < 4; j++)
                {
                    for (k = 0; k < 3; k++)
                    {
                        val = VVvalue[j][k];
                        if (j == permU)
                        {
                            TSIL_Compare (vvname[j][k], val, result.V[j].bold[k],
                                          TSIL_PASS_V, TSIL_WARN_V, &foo);
                            tally[foo]++;
                        }
                    }
                }

                /* TT */
                for (j = 0; j < 6; j++)
                {
                    for (k = 0; k < 3; k++)
                    {
                        val = TTvalue[j][k];
                        if (j == permT11)
                        {
                            TSIL_Compare (ttname[j][k], val,
                                          result.T[permT12].bold[k],
                                          TSIL_PASS, TSIL_WARN, &foo);
                            tally[foo]++;
                        }
                        if (j == permT21)
                        {
                            TSIL_Compare (ttname[j][k], val,
                                          result.T[permT22].bold[k], TSIL_PASS, TSIL_WARN, &foo);
                            tally[foo]++;
                        }
                        if (j == permT31)
                        {
                            TSIL_Compare (ttname[j][k], val,
                                          result.T[permT32].bold[k], TSIL_PASS, TSIL_WARN, &foo);
                            tally[foo]++;
                        }
                    }
                }

                /* SS */
                for (j = 0; j < 2; j++)
                {
                    for (k = 0; k < 3; k++)
                    {
                        val = SSvalue[j][k];
                        if (j == permS)
                        {
                            TSIL_Compare (ssname[j][k], val, result.S[j].bold[k],
                                          TSIL_PASS, TSIL_WARN, &foo);
                            tally[foo]++;
                        }
                    }
                }

                if (tally[FAIL] > 0)
                {
                    nfail++;
                    printf ("\nFAILED FOR INPUT PARAMETERS:\n");
                    printf ("x = %.16lf;\n", (double) x);
                    printf ("y = %.16lf;\n", (double) y);
                    printf ("z = %.16lf;\n", (double) z);
                    printf ("u = %.16lf;\n", (double) u);
                    printf ("v = %.16lf;\n", (double) v);
                    printf ("s = %.16lf;\n", (double) s);
                    printf ("qq = %.16lf;\n", (double) qq);
                }
                else if (tally[WARN] > 0)
                {
                    nwarn++;
                    printf ("\nPASS\n");
                }
                else
                {
                    printf ("\nPASS\n");
                    npass++;
                }
            }
        }

        fclose (fp);

        printf ("\n===== Done with input file ");
        printf ("%s", argv[i]);
        printf (" =====\n");
    }

    printf ("\n== FINAL RESULTS ==\n");
    printf ("Total input files: %d\n", (argc - 1));
    printf ("Total tests performed: %d\n",
            (1 + Doperms * 3 + Doextraperms * 4) * (argc - 1));
    printf ("Pass: %d\n", npass);
    printf ("Warn: %d\n", nwarn);
    printf ("Fail: %d\n", nfail);

    return 0;
}
Beispiel #6
0
void tsilfevaluate_ (TSIL_REAL_F *x, 
		     TSIL_REAL_F *y,
		     TSIL_REAL_F *z,
		     TSIL_REAL_F *u,
		     TSIL_REAL_F *v,
		     TSIL_REAL_F *qq,
		     TSIL_REAL_F *s)
{
  /* Below is cut and pasted directly from tsil_names.h */
  const char *uname[] = {"Uzxyv","Uuyxv","Uxzuv","Uyuzv"};
  const char *tname[] = {"Tvyz", "Tuxv", "Tyzv", "Txuv", "Tzyv", "Tvxu"};
  const char *sname[] = {"Svyz", "Suxv"};
  const char *bname[] = {"Bxz", "Byu"};
  const char *vname[] = {"Vzxyv","Vuyxv","Vxzuv","Vyuzv"};
  const char *tbarname[] = {"TBARvyz", "TBARuxv", "TBARyzv",
			    "TBARxuv", "TBARzyv", "TBARvxu"};

  TSIL_DATA res;
  int i, j;
  static int compiledSize = TSIL_REAL_SIZE_F;

  if (rsize_.rsize != compiledSize)
    TSIL_Warn ("tsilfevaluate", "Apparent type mismatch between Fortran and C!");

  TSIL_SetParameters (&res,
		      (TSIL_REAL) (*x),
		      (TSIL_REAL) (*y),
		      (TSIL_REAL) (*z), 
		      (TSIL_REAL) (*u),
		      (TSIL_REAL) (*v),
		      (TSIL_REAL) (*qq));

  TSIL_Evaluate (&res, (TSIL_REAL) (*s));

  /* Extract results */
  results_.M = (TSIL_COMPLEX_F) TSIL_GetFunction (&res, "M");

  /* Note non-standard indexing-by-pointer of UU, VV, TT, SS arrays
     for compatibility with Fortran indexing convention. */

  for (i=0; i<NUM_U_FUNCS; i++) {
    results_.U[i] = (TSIL_COMPLEX_F) TSIL_GetFunction (&res, uname[i]);
    results_.V[i] = (TSIL_COMPLEX_F) TSIL_GetFunction (&res, vname[i]);
    for (j=0; j<3; j++) {
      *(&(results_.UU[0][0]) + j * NUM_U_FUNCS + i) = 
        (TSIL_COMPLEX_F) TSIL_GetBoldFunction (&res, uname[i], j);
      *(&(results_.VV[0][0]) + j * NUM_U_FUNCS + i) = 
        (TSIL_COMPLEX_F) TSIL_GetBoldFunction (&res, vname[i], j);
    }
  }

  for (i=0; i<NUM_T_FUNCS; i++) {
    results_.T[i] = (TSIL_COMPLEX_F) TSIL_GetFunction (&res, tname[i]);
    results_.Tbar[i] = (TSIL_COMPLEX_F) TSIL_GetFunction (&res, tbarname[i]);
    for (j=0; j<3; j++)
      *(&(results_.TT[0][0]) + j * NUM_T_FUNCS + i) = 
        (TSIL_COMPLEX_F) TSIL_GetBoldFunction (&res, tname[i], j);
  }
  
  for (i=0; i<NUM_S_FUNCS; i++) {
    results_.S[i] = (TSIL_COMPLEX_F) TSIL_GetFunction (&res, sname[i]);
    for (j=0; j<3; j++)
      *(&(results_.SS[0][0])  + j * NUM_S_FUNCS + i) = 
        (TSIL_COMPLEX_F) TSIL_GetBoldFunction (&res, sname[i], j);
  }

  for (i=0; i<NUM_B_FUNCS; i++)
    results_.B[i] = (TSIL_COMPLEX_F) TSIL_GetFunction (&res, bname[i]);

  return;
}