Changes in / [9aac25d:98f3053] in sasmodels
- Location:
- sasmodels
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r190fc2b rd5e650d 539 539 if Ncomp > 0 and Nbase > 0: 540 540 plt.subplot(133) 541 if '-abs' in opts:541 if not opts['rel_err']: 542 542 err, errstr, errview = resid, "abs err", "linear" 543 543 else: … … 545 545 #err,errstr = base/comp,"ratio" 546 546 plot_theory(data, None, resid=err, view=errview, use_data=False) 547 if view == 'linear': 548 plt.xscale('linear') 547 549 plt.title("max %s = %.3g"%(errstr, max(abs(err)))) 548 550 #cbar_title = errstr if errview=="linear" else "log "+errstr -
sasmodels/convert.py
r5054e80 r3964f92 14 14 'be_polyelectrolyte', 15 15 'correlation_length', 16 'binary_hard_sphere' 16 17 ] 17 18 -
sasmodels/kernel_template.c
rcaf768d r840b859 16 16 using namespace std; 17 17 #if defined(_MSC_VER) 18 #include <limits> 18 19 #include <float.h> 19 20 #define kernel extern "C" __declspec( dllexport ) … … 22 23 inline double fmax(double x, double y) { return x<y ? y : x; } 23 24 inline double isnan(double x) { return _isnan(x); } 25 #define NAN (std::numeric_limits<double>::quiet_NaN()) // non-signalling NaN 26 static double cephes_expm1(double x) { 27 // Adapted from the cephes math library. 28 // Copyright 1984 - 1992 by Stephen L. Moshier 29 if (x != x || x == 0.0) { 30 return x; // NaN and +/- 0 31 } else if (x < -0.5 || x > 0.5) { 32 return exp(x) - 1.0; 33 } else { 34 const double xsq = x*x; 35 const double p = ((( 36 +1.2617719307481059087798E-4)*xsq 37 +3.0299440770744196129956E-2)*xsq 38 +9.9999999999999999991025E-1); 39 const double q = (((( 40 +3.0019850513866445504159E-6)*xsq 41 +2.5244834034968410419224E-3)*xsq 42 +2.2726554820815502876593E-1)*xsq 43 +2.0000000000000000000897E0); 44 double r = x * p; 45 r = r / (q - r); 46 return r+r; 47 } 48 } 49 #define expm1 cephes_expm1 24 50 #else 25 51 #define kernel extern "C"
Note: See TracChangeset
for help on using the changeset viewer.