lpmv_real

Function lpmv_real 

Source
pub fn lpmv_real(degree: f64, order: f64, x: f64) -> Result<f64>
Expand description

Associated Legendre function P_degree^order(x) of a real argument, as a real value.

Outside [-1, 1] the odd orders with |order| <= degree have imaginary values: this function rejects them, and angular_value returns them for a complex argument. Orders with |order| > degree give zero.

Upstream: treams.special.lpmv with real arguments, which takes (order, degree, x). Differences: for an integer degree, x outside [-1, 1] and 0 < |order| <= degree, treams returns NaN, while this function returns the real value for even orders and an error for odd orders. Degrees outside [0, 128], non-integer orders, non-finite x and non-integer degrees with x outside (-1, 1] give an error, where treams returns a value or NaN.