Changeset 9958cb0 in sasmodels for sasmodels/models/lib
- Timestamp:
- Feb 4, 2016 9:00:15 AM (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:
- bb6f0f3, 81bb668
- Parents:
- 81dd619 (diff), a17fe40 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- sasmodels/models/lib
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/lib/Si.c
r7d256c8 rf12357f 13 13 14 14 // Explicitly writing factorial values triples the speed of the calculation 15 out_cos = 1 /x - 2/pow(x,3) + 24/pow(x,5) - 720/pow(x,7) + 40320/pow(x,9);16 out_sin = 1 /x - 6/pow(x,4) + 120/pow(x,6) - 5040/pow(x,8) + 362880/pow(x,10);15 out_cos = 1./x - 2./pow(x,3) + 24./pow(x,5) - 720./pow(x,7); 16 out_sin = 1./pow(x,2) - 6./pow(x,4) + 120./pow(x,6) - 5040./pow(x,8); 17 17 18 18 out -= cos(x) * out_cos; … … 22 22 23 23 // Explicitly writing factorial values triples the speed of the calculation 24 out = x - pow(x, 3)/18 + pow(x,5)/600 - pow(x,7)/35280 + pow(x,9)/3265920;24 out = x - pow(x, 3)/18. + pow(x,5)/600. - pow(x,7)/35280. + pow(x,9)/3265920. - pow(x,11)/439084800.; 25 25 26 //printf ("Si=%g %g\n", x, out);27 26 return out; 28 27 }
Note: See TracChangeset
for help on using the changeset viewer.