Go to the source code of this file.
|
double | polleg (int l, double x) |
|
◆ polleg()
double polleg |
( |
int |
l, |
|
|
double |
x |
|
) |
| |
Definition at line 14 of file PolLeg.cpp.
14 {
15 mfunname(
"double polleg(int l, double x)");
18 switch (l) {
19 case 0:
20 return 1.0;
21 case 1:
22 return x;
23 case 2:
24 return 0.5 * (3.0 * x * x - 1.0);
25 case 3:
26 return 0.5 * (5.0 * x * x * x - 3.0 * x);
27 case 4: {
28 double x2 = x * x;
29 return 1.0 / 8.0 * (35.0 * x2 * x2 - 30.0 * x2 + 3.0);
30 }
31 case 5: {
32 double x2 = x * x;
33 double x3 = x2 * x;
34 return 1.0 / 8.0 * (63.0 * x3 * x2 - 70.0 * x3 + 15.0 * x);
35 }
36 case 6: {
37 double x2 = x * x;
38 double x4 = x2 * x2;
39 return 1.0 / 16.0 * (231.0 * x4 * x2 - 315.0 * x4 + 105.0 * x2 - 5.0);
40 }
41 default:
42 return 0.0;
43 }
44
45
46
47
48
49
50
51
52
53}
#define check_econd11(a, signb, stream)
#define check_econd11a(a, signb, add, stream)
Referenced by Heed::ElElasticScatDataStruct::CS().