Changes in / [8696a87:5c962df] in sasmodels


Ignore:
Location:
sasmodels/models
Files:
4 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lib/wrc_cyl.c

    r504abee rf94d8a2  
    297297} 
    298298 
    299 static double 
    300 Sdebye_kernel(double arg) 
    301 { 
    302     // ORIGINAL 
    303     double result = 2.0*(exp(-arg) + arg -1.0)/(pow((arg),2)); 
    304  
    305     // CONVERSION 1 from http://herbie.uwplse.org/ 
    306     // 
    307     // exhibits discontinuity - needs more investigation 
    308     //double a1 = 1.0/6.0; 
    309     //double a2 = 1.0/72.0; 
    310     //double a3 = 1.0/24.0; 
    311     //double result = pow((1.0 - a1*arg - (a2+a3)*arg*arg), 2); 
    312  
    313     return result; 
    314 } 
     299 
    315300static double 
    316301Sdebye(double q, double L, double b) 
    317302{ 
    318     double arg = u_WR(q,L,b); 
    319     return Sdebye_kernel(arg); 
     303    return 2.0*(exp(-u_WR(q,L,b)) + u_WR(q,L,b) -1.0)/(pow((u_WR(q,L,b)),2)); 
    320304} 
    321305 
     
    324308Sdebye1(double q, double L, double b) 
    325309{ 
    326     double arg = u1(q,L,b); 
    327     return Sdebye_kernel(arg); 
    328  
     310    return 2.0*(exp(-u1(q,L,b)) + u1(q,L,b) -1.0)/( pow((u1(q,L,b)),2.0) ); 
    329311} 
    330312 
Note: See TracChangeset for help on using the changeset viewer.