Changeset b6c8abe in sasview for src/sas/sascalc/calculator/c_extensions/libfunc.c
- Timestamp:
- Mar 29, 2016 4:31:12 AM (9 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- eca66a1
- Parents:
- c31dcdb1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/calculator/c_extensions/libfunc.c
r197260f rb6c8abe 87 87 } 88 88 89 /*90 double gamln(double xx) {91 92 double x,y,tmp,ser;93 static double cof[6]={76.18009172947146,-86.50532032941677,94 24.01409824083091,-1.231739572450155,95 0.1208650973866179e-2,-0.5395239384953e-5};96 int j;97 98 y=x=xx;99 tmp=x+5.5;100 tmp -= (x+0.5)*log(tmp);101 ser=1.000000000190015;102 for (j=0;j<=5;j++) ser += cof[j]/++y;103 return -tmp+log(2.5066282746310005*ser/x);104 }105 */106 89 // calculate magnetic sld and return total sld 107 90 // bn : contrast (not just sld of the layer) … … 240 223 **/ 241 224 242 225 /* 243 226 #define ITMAX 100 244 227 #define EPS 3.0e-7 … … 272 255 } 273 256 274 275 } 276 257 } 258 */ 277 259 /** 278 260 Implements the incomplete gamma function Q(a,x) evaluated by its continued fraction 279 261 representation 280 262 **/ 263 /* 281 264 void gcf(float *gammcf, float a, float x, float *gln) { 282 265 int i; … … 304 287 return; 305 288 } 306 289 */ 307 290 /** 308 291 Represents incomplete error function, P(a,x) 309 292 **/ 293 /* 310 294 float gammp(float a, float x) { 311 295 float gamser,gammcf,gln; … … 319 303 } 320 304 } 305 */ 321 306 /** 322 307 Implementation of the error function, erf(x) 323 308 **/ 309 /* 324 310 float erff(float x) { 325 311 return x < 0.0 ? -gammp(0.5,x*x) : gammp(0.5,x*x); 326 312 } 313 */
Note: See TracChangeset
for help on using the changeset viewer.