Changeset 8bea12dd in sasview
- Timestamp:
- Jan 4, 2012 2:20:35 PM (13 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:
- 67424cd
- Parents:
- 8542bf3
- Location:
- sansmodels/src/sans/models/libigor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/libigor/libTwoPhase.c
r34c2649 r8bea12dd 5 5 #include "StandardHeaders.h" // Include ANSI headers, Mac headers 6 6 #include "libTwoPhase.h" 7 8 /* internal functions */ 9 static double 10 gammln(double xx) { 11 12 double x,y,tmp,ser; 13 static double cof[6]={76.18009172947146,-86.50532032941677, 14 24.01409824083091,-1.231739572450155, 15 0.1208650973866179e-2,-0.5395239384953e-5}; 16 int j; 17 18 y=x=xx; 19 tmp=x+5.5; 20 tmp -= (x+0.5)*log(tmp); 21 ser=1.000000000190015; 22 for (j=0;j<=5;j++) ser += cof[j]/++y; 23 return -tmp+log(2.5066282746310005*ser/x); 24 } 7 25 8 26 // scattering from the Teubner-Strey model for microemulsions - hardly needs to be an XOP... -
sansmodels/src/sans/models/libigor/libTwoPhase.h
r34c2649 r8bea12dd 22 22 double GaussianShell(double dp[], double q); 23 23 24 25 /* internal functions */26 static double27 gammln(double xx) {28 29 double x,y,tmp,ser;30 static double cof[6]={76.18009172947146,-86.50532032941677,31 24.01409824083091,-1.231739572450155,32 0.1208650973866179e-2,-0.5395239384953e-5};33 int j;34 35 y=x=xx;36 tmp=x+5.5;37 tmp -= (x+0.5)*log(tmp);38 ser=1.000000000190015;39 for (j=0;j<=5;j++) ser += cof[j]/++y;40 return -tmp+log(2.5066282746310005*ser/x);41 }42 43
Note: See TracChangeset
for help on using the changeset viewer.