repl.txt (1549B)
1 2 {{alias}}( x, x0, Ɣ ) 3 Evaluates the natural logarithm of the probability density function (logPDF) 4 for a Cauchy distribution with location parameter `x0` and scale parameter 5 `Ɣ` at a value `x`. 6 7 If provided `NaN` as any argument, the function returns `NaN`. 8 9 If provided `Ɣ <= 0`, the function returns `NaN`. 10 11 Parameters 12 ---------- 13 x: number 14 Input value. 15 16 x0: number 17 Location parameter. 18 19 Ɣ: number 20 Scale parameter. 21 22 Returns 23 ------- 24 out: number 25 Natural logarithm of PDF. 26 27 Examples 28 -------- 29 > var y = {{alias}}( 2.0, 1.0, 1.0 ) 30 ~-1.838 31 > y = {{alias}}( 4.0, 3.0, 0.1 ) 32 ~-3.457 33 > y = {{alias}}( 4.0, 3.0, 3.0 ) 34 ~-2.349 35 > y = {{alias}}( NaN, 1.0, 1.0 ) 36 NaN 37 > y = {{alias}}( 2.0, NaN, 1.0 ) 38 NaN 39 > y = {{alias}}( 2.0, 1.0, NaN ) 40 NaN 41 // Negative scale parameter: 42 > y = {{alias}}( 2.0, 1.0, -2.0 ) 43 NaN 44 45 46 {{alias}}.factory( x0, Ɣ ) 47 Returns a function for evaluating the natural logarithm of the probability 48 density function (logPDF) of a Cauchy distribution with location parameter 49 `x0` and scale parameter `Ɣ`. 50 51 Parameters 52 ---------- 53 x0: number 54 Location parameter. 55 56 Ɣ: number 57 Scale parameter. 58 59 Returns 60 ------- 61 logpdf: Function 62 Function to evaluate the natural logarithm of the PDF. 63 64 Examples 65 -------- 66 > var mylogPDF = {{alias}}.factory( 10.0, 2.0 ); 67 > var y = mylogPDF( 10.0 ) 68 ~-1.838 69 70 See Also 71 -------- 72