---
name: "PDL::GSLSF::LEGENDRE"
section: "3pm"
platform: "linux"
package: "pdl"
version: "1:2.081-2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/PDL::GSLSF::LEGENDRE"
---

# PDL::GSLSF::LEGENDRE(3pm)

PDL interface to GSL Special Functions

## NAME

PDL::GSLSF::LEGENDRE - PDL interface to GSL Special Functions

## DESCRIPTION

This is an interface to the Special Function package present in the GNU Scientific Library.

## FUNCTIONS

### gsl\_sf\_legendre\_Pl

```
  Signature: (double x(); double [o]y(); double [o]e(); int l)
```

P\_l(x)

gsl\_sf\_legendre\_Pl does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_legendre\_Pl\_array

```
  Signature: (double x(); double [o]y(num); int l=>num)
```

P\_l(x) from 0 to n-1.

gsl\_sf\_legendre\_Pl\_array does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_legendre\_Ql

```
  Signature: (double x(); double [o]y(); double [o]e(); int l)
```

Q\_l(x)

gsl\_sf\_legendre\_Ql does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_legendre\_Plm

```
  Signature: (double x(); double [o]y(); double [o]e(); int l; int m)
```

P\_lm(x)

gsl\_sf\_legendre\_Plm does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_legendre\_array

```
  Signature: (double x(); double [o]y(n); double [t]work(wn); char norm;  int lmax; int csphase)
```

Calculate all normalized associated Legendre polynomials.

`$Plm` = gsl\_sf\_legendre\_array($x,'P',4,-1);

The calculation is done for degree 0 \<= l \<= lmax and order 0 \<= m \<= l on the range abs(x)\<=1.

The parameter norm should be:

- 'S' for Schmidt semi-normalized associated Legendre polynomials S\_l^m(x),

  - 'Y' for spherical harmonic associated Legendre polynomials Y\_l^m(x), or

  - 'N' for fully normalized associated Legendre polynomials N\_l^m(x).

  - 'P' (or any other) for unnormalized associated Legendre polynomials P\_l^m(x),

  lmax is the maximum degree l. csphase should be (-1) to INCLUDE the Condon-Shortley phase factor (-1)^m, or (+1) to EXCLUDE it.

See "gsl\_sf\_legendre\_array\_index" to get the value of `"l"` and `"m"` in the returned vector.

gsl\_sf\_legendre\_array processes bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_legendre\_array\_index

```
  Signature: (int [o]l(n); int [o]m(n); int lmax)
```

Calculate the relation between gsl\_sf\_legendre\_arrays index and l and m values.

Note that this function is called differently than the corresponding GSL function, to make it more useful for PDL: here you just input the maximum l (lmax) that was used in `"gsl_sf_legendre_array"` and it calculates all l and m values.

gsl\_sf\_legendre\_array\_index does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_legendre\_sphPlm

```
  Signature: (double x(); double [o]y(); double [o]e(); int l; int m)
```

P\_lm(x), normalized properly for use in spherical harmonics

gsl\_sf\_legendre\_sphPlm does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_conicalP\_half

```
  Signature: (double x(); double [o]y(); double [o]e(); double lambda)
```

Irregular Spherical Conical Function P^{1/2}\_{-1/2 + I lambda}(x)

gsl\_sf\_conicalP\_half does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_conicalP\_mhalf

```
  Signature: (double x(); double [o]y(); double [o]e(); double lambda)
```

Regular Spherical Conical Function P^{-1/2}\_{-1/2 + I lambda}(x)

gsl\_sf\_conicalP\_mhalf does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_conicalP\_0

```
  Signature: (double x(); double [o]y(); double [o]e(); double lambda)
```

Conical Function P^{0}\_{-1/2 + I lambda}(x)

gsl\_sf\_conicalP\_0 does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_conicalP\_1

```
  Signature: (double x(); double [o]y(); double [o]e(); double lambda)
```

Conical Function P^{1}\_{-1/2 + I lambda}(x)

gsl\_sf\_conicalP\_1 does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_conicalP\_sph\_reg

```
  Signature: (double x(); double [o]y(); double [o]e(); int l; double lambda)
```

Regular Spherical Conical Function P^{-1/2-l}\_{-1/2 + I lambda}(x)

gsl\_sf\_conicalP\_sph\_reg does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_conicalP\_cyl\_reg\_e

```
  Signature: (double x(); double [o]y(); double [o]e(); int m; double lambda)
```

Regular Cylindrical Conical Function P^{-m}\_{-1/2 + I lambda}(x)

gsl\_sf\_conicalP\_cyl\_reg\_e does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_legendre\_H3d

```
  Signature: (double [o]y(); double [o]e(); int l; double lambda; double eta)
```

lth radial eigenfunction of the Laplacian on the 3-dimensional hyperbolic space.

gsl\_sf\_legendre\_H3d does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

### gsl\_sf\_legendre\_H3d\_array

```
  Signature: (double [o]y(num); int l=>num; double lambda; double eta)
```

Array of H3d(ell), for l from 0 to n-1.

gsl\_sf\_legendre\_H3d\_array does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.

## AUTHOR

This file copyright (C) 1999 Christian Pellegrin \<chri@infis.univ.trieste.it\> All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file.

The GSL SF modules were written by G. Jungman.
