Revision 1110 trunk/src/df1b2-separable/df1b2normmix2.cpp

df1b2normmix2.cpp (revision 1110)
2 2
 * $Id$
3 3
 *
4 4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
5
 * Copyright (c) 2008-2012 Regents of the University of California
6 6
 */
7 7
/**
8 8
 * \file
......
12 12

  
13 13
static double cc=0.39894228040143267794;
14 14

  
15
typedef double (*pinit_f)(double y,double a); 
15
typedef double (*pinit_f)(double y,double a);
16 16

  
17 17
double  nr_generic(double y,double a,pinit_f p_get_initial_x,
18 18
  pinit_f pfun,pinit_f pdfun);
......
121 121
           +2.0*exp(-2.0*x/a)/cube(1.0+exp(-x/a)));
122 122

  
123 123
  double d3g=-cc*0.95*e1 +cc*x2*0.95*e1 +0.05/(a*a*a)*(
124
     exp(-x/a)/square(1.0+exp(-x/a)) -6.0*exp(-2.0*x/a)/cube(1.0+exp(-x/a))  
124
     exp(-x/a)/square(1.0+exp(-x/a)) -6.0*exp(-2.0*x/a)/cube(1.0+exp(-x/a))
125 125
     +6.0*exp(-3.0*x/a)/square(square(1.0+exp(-x/a))));
126
   
127 126

  
128

  
129 127
  double dfx=1.0/dgx;
130 128
  double d2f=-d2g*cube(dfx);
131 129
  double d3f=-d3g*cube(dfx)*dfx-3.0*d2g*d2f*square(dfx);
......
142 140

  
143 141
  return z;
144 142
}
145

  

Also available in: Unified diff