Changeset 93f02d51 in sasview for park-1.2.1/park/lib
- Timestamp:
- Nov 30, 2011 10:20:40 AM (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:
- 0003cc3
- Parents:
- e13ef7f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park-1.2.1/park/lib/resolution.c
r3570545 r93f02d51 7 7 #ifdef SGI 8 8 #include <ieeefp.h> 9 #endif 10 #if defined(_MSC_VER) 11 double erf(double x) 12 { 13 // constants 14 double a1 = 0.254829592; 15 double a2 = -0.284496736; 16 double a3 = 1.421413741; 17 double a4 = -1.453152027; 18 double a5 = 1.061405429; 19 double p = 0.3275911; 20 21 // Save the sign of x 22 int sign = 1; 23 if (x < 0) 24 sign = -1; 25 x = fabs(x); 26 27 // A&S formula 7.1.26 28 double t = 1.0/(1.0 + p*x); 29 double y = 1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x); 30 31 return sign*y; 32 } 9 33 #endif 10 34
Note: See TracChangeset
for help on using the changeset viewer.