core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since ba32cdd was
ad9af31,
checked in by wojciech, 8 years ago
|
Gamma checked in
|
-
Property mode set to
100644
|
File size:
376 bytes
|
Line | |
---|
1 | /* |
---|
2 | The wrapper for gamma function from OpenCL and standard libraries |
---|
3 | The OpenCL gamma function fails misserably on values lower than 1.0 |
---|
4 | while works fine on larger values. |
---|
5 | We use gamma definition Gamma(t + 1) = t * Gamma(t) to compute |
---|
6 | to function for values lower than 1.0. Namely Gamma(t) = 1/t * Gamma(t + 1) |
---|
7 | */ |
---|
8 | |
---|
9 | |
---|
10 | inline double sas_gamma( double x) { return tgamma(x+1)/x; } |
---|
Note: See
TracBrowser
for help on using the repository browser.