Changeset 0278e3f in sasmodels
- Timestamp:
- Apr 6, 2016 7:22:46 PM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3a45c2c, e6408d0
- Parents:
- c4e7a5f
- Location:
- sasmodels
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_template.c
rc4e7a5f r0278e3f 226 226 #ifdef IQXY_OPEN_LOOPS 227 227 double ret=0.0, norm=0.0; 228 #ifdef VOLUME_PARAMETERS229 double vol=0.0, norm_vol=0.0;230 #endif231 228 IQXY_OPEN_LOOPS 232 229 //for (int radius_i=0; radius_i < Nradius; radius_i++) { … … 243 240 // For cos(theta) fixed at 90, we effectively multiply top and bottom 244 241 // by 1e-6, so the effect cancels. 245 const double spherical_correction = fmax(fabs(cos(M_PI_180*theta)), 1 e-6);242 const double spherical_correction = fmax(fabs(cos(M_PI_180*theta)), 1.e-6); 246 243 weight *= spherical_correction; 247 244 #endif -
sasmodels/models/lib/Si.c
re7678b2 r0278e3f 1 // integral of sin(x)/x Taylor series approximated to w/i 0.1% 1 2 double Si(double x); 2 3 // integral of sin(x)/x Taylor series approximated to w/i 0.1%4 3 double Si(double x) 5 4 { -
sasmodels/models/lib/polevl.c
r0b05c24 r0278e3f 51 51 */ 52 52 53 double polevl( double x, constant double *coef, int N ) { 53 double polevl( double x, constant double *coef, int N ); 54 double polevl( double x, constant double *coef, int N ) 55 { 54 56 55 57 int i = 0; … … 61 63 } 62 64 63 return ans 65 return ans; 64 66 } 65 67 … … 70 72 */ 71 73 72 double p1evl( double x, constant double *coef, int N ) { 74 double p1evl( double x, constant double *coef, int N ); 75 double p1evl( double x, constant double *coef, int N ) 76 { 73 77 int i=0; 74 78 double ans = x+coef[i]; … … 79 83 } 80 84 81 return ( ans );85 return ans; 82 86 } -
sasmodels/models/lib/sas_J0.c
ra776125 r0278e3f 177 177 }; 178 178 179 double sas_J0(double x) { 179 double sas_J0(double x); 180 double sas_J0(double x) 181 { 180 182 181 183 //Cephes single precission -
sasmodels/models/lib/sas_J1.c
r19b9005 r0278e3f 135 135 }; 136 136 137 double sas_J1(double x) { 137 double sas_J1(double x); 138 double sas_J1(double x) 139 { 138 140 139 141 //Cephes double pression function … … 206 208 207 209 //Finally J1c function that equals 2*J1(x)/x 208 double sas_J1c(double x) { 210 double sas_J1c(double x); 211 double sas_J1c(double x) 212 { 209 213 return (x != 0.0 ) ? 2.0*sas_J1(x)/x : 1.0; 210 214 } -
sasmodels/models/lib/sas_JN.c
ra776125 r0278e3f 48 48 */ 49 49 50 double sas_JN( int n, double x ); 51 52 double sas_JN( int n, double x ) { 50 static double 51 sas_JN( int n, double x ) { 53 52 54 53 const double MACHEP = 1.11022302462515654042E-16;
Note: See TracChangeset
for help on using the changeset viewer.