Changeset 98cb4d7 in sasmodels for sasmodels/models/lib/sas_gamma.c
- Timestamp:
- Apr 26, 2016 1:00:14 PM (8 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, 2a55a6f
- Parents:
- e9dc7df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/lib/sas_gamma.c
re9dc7df r98cb4d7 1 1 /* 2 2 The wrapper for gamma function from OpenCL and standard libraries 3 The OpenCL gamma function fails mis serably on values lower than 1.03 The OpenCL gamma function fails miserably on values lower than 1.0 4 4 while works fine on larger values. 5 5 We use gamma definition Gamma(t + 1) = t * Gamma(t) to compute … … 7 7 */ 8 8 9 #ifdef tgamma 10 inline double sas_gamma( double x) { return tgamma(x+1)/x; } 11 #else 9 #if defined(NEED_TGAMMA) 12 10 static double cephes_stirf(double x) 13 11 { … … 39 37 } 40 38 41 double sas_gamma(double x) {39 static double tgamma(double x) { 42 40 double p, q, z; 43 41 int sgngam; … … 137 135 } 138 136 #endif 137 138 139 inline double sas_gamma( double x) { return tgamma(x+1)/x; }
Note: See TracChangeset
for help on using the changeset viewer.