S2kit  1.1
Toolkit for working with functions defined on the sphere
l2_norms.c
Go to the documentation of this file.
1 
8 #include "l2_norms.h"
9 
10 #include <math.h>
11 
16 double L2_an(const int m, const int l) {
17  return (
18  sqrt(
19  ((2. * l + 3.) / (2. * l + 1.)) * ((l - m + 1.) / (l + m + 1.))
20  ) * ((2. * l + 1.) / (l - m + 1.))
21  );
22 }
23 
28 double L2_cn(const int m, const int l) {
29  if (!l) {
30  return 0.;
31  }
32 
33  return (
34  -1.0 * sqrt(
35  ((2. * l + 3.) / (2. * l - 1.)) * ((l - m + 1.) / (l + m + 1.)) * (((double)l - m) / ((double)l + m))
36  ) * ((l + m) / (l - m + 1.))
37  );
38 }
39 
46 double L2_cn_inv(const int m, const int l) {
47  return (
48  -(1.0 + (1. - 2. * m) / ((double)m + l)) *
49  sqrt(
50  ((-1. + 2. * l) / (3. + 2. * l)) * (
51  (l + l * l + m + 2. * l * m + m * m) /
52  (l + l * l - m - 2. * l * m + m * m)
53  )
54  )
55  );
56 }
57 
64 double L2_ancn(const int m, const int l) {
65  return (
66  sqrt(4. + ((4. * m * m - 1.) / ((double)l * l - m * m)))
67  );
68 }
L2_cn
double L2_cn(const int m, const int l)
Definition: l2_norms.c:28
L2_an
double L2_an(const int m, const int l)
Definition: l2_norms.c:16
L2_ancn
double L2_ancn(const int m, const int l)
Definition: l2_norms.c:64
l2_norms.h
L2_cn_inv
double L2_cn_inv(const int m, const int l)
Definition: l2_norms.c:46