Changeset dcef2ee in sasmodels
- Timestamp:
- Dec 8, 2015 1:21:02 PM (9 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:
- 9a66e65
- Parents:
- cf404cb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/lib/Si.c
rcf404cb rdcef2ee 1 int factorial(int f); 1 2 double Si(double x); 3 2 4 // integral of sin(x)/x: approximated to w/i 1% 3 5 double Si(double x) … … 33 35 34 36 power = pow(x,(2 * i + 1)); 35 out += (double)pow(-1, i) * power / ((2.0 * (double)i + 1.0) * (double)factorial(2 * i + 1));37 out += pow(-1.0, i) * power / ((2.0 * (double)i + 1.0) * (double)factorial(2 * i + 1)); 36 38 37 39 //printf ("Si=%g %g %d\n", x, out, i); … … 41 43 } 42 44 43 int factorial(int f);44 45 int factorial(int f) 45 46 {
Note: See TracChangeset
for help on using the changeset viewer.