core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since a8b3cdb was
a8b3cdb,
checked in by Doucet, Mathieu <doucetm@…>, 8 years ago
|
Converted elliptical cylinder model
|
-
Property mode set to
100644
|
File size:
1006 bytes
|
Rev | Line | |
---|
[a8b3cdb] | 1 | double NR_BessJ1(double x); |
---|
| 2 | double NR_BessJ1(double x) |
---|
| 3 | { |
---|
| 4 | double ax,z; |
---|
| 5 | double xx,y,ans,ans1,ans2; |
---|
| 6 | |
---|
| 7 | if ((ax=fabs(x)) < 8.0) { |
---|
| 8 | y=x*x; |
---|
| 9 | ans1=x*(72362614232.0+y*(-7895059235.0+y*(242396853.1 |
---|
| 10 | +y*(-2972611.439+y*(15704.48260+y*(-30.16036606)))))); |
---|
| 11 | ans2=144725228442.0+y*(2300535178.0+y*(18583304.74 |
---|
| 12 | +y*(99447.43394+y*(376.9991397+y*1.0)))); |
---|
| 13 | ans=ans1/ans2; |
---|
| 14 | } else { |
---|
| 15 | z=8.0/ax; |
---|
| 16 | y=z*z; |
---|
| 17 | xx=ax-2.356194491; |
---|
| 18 | ans1=1.0+y*(0.183105e-2+y*(-0.3516396496e-4 |
---|
| 19 | +y*(0.2457520174e-5+y*(-0.240337019e-6)))); |
---|
| 20 | ans2=0.04687499995+y*(-0.2002690873e-3 |
---|
| 21 | +y*(0.8449199096e-5+y*(-0.88228987e-6 |
---|
| 22 | +y*0.105787412e-6))); |
---|
| 23 | ans=sqrt(0.636619772/ax)*(cos(xx)*ans1-z*sin(xx)*ans2); |
---|
| 24 | if (x < 0.0) ans = -ans; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | return(ans); |
---|
| 28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.