s22aa {NAGFWrappers}R Documentation

s22aa: Legendre functions of 1st kind P_n^m(x) or overlineP_n^m(x)

Description

s22aa returns a sequence of values for either the unnormalized or normalized Legendre functions of the first kind P_n^m(x) or overlineP_n^m(x) for real x of a given order m and degree n = 0 , 1 , . . . , N.

Usage

s22aa(mode, x, m, nl)

Arguments

mode

integer

Indicates whether the sequence of function values is to be returned unnormalized or normalized.

mode = 1

: The sequence of function values is returned unnormalized.

mode = 2

: The sequence of function values is returned normalized.

x

double

The argument x of the function.

m

integer

The order m of the function.

nl

integer

The degree N of the last function required in the sequence.

Details

R interface to the NAG Fortran routine S22AAF.

Value

P

double array

The required sequence of function values as follows:

if mode = 1, p[n] contains P_n^m(x) for n=0 . . . N;

if mode = 2, p[n] contains overlineP_n^m(x) for n=0 . . . N.

IFAIL

integer

ifail =0

unless the function detects an error or a warning has been flagged (see the Errors section in Fortran library documentation).

Author(s)

NAG

References

http://www.nag.co.uk/numeric/FL/nagdoc_fl23/pdf/S/s22aaf.pdf

Examples


ifail<-0

mode<-1

x<-0.5

m<-2

nl<-3

s22aa(mode,x,m,nl)


[Package NAGFWrappers version 24.0 Index]