time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (1680B)


      1 
      2 {{alias}}( x, μ, σ )
      3     Evaluates the natural logarithm of the probability density function (PDF)
      4     for a lognormal distribution with location parameter `μ` 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     μ: number
     17         Location parameter.
     18 
     19     σ: number
     20         Scale parameter.
     21 
     22     Returns
     23     -------
     24     out: number
     25         Evaluated logPDF.
     26 
     27     Examples
     28     --------
     29     > var y = {{alias}}( 2.0, 0.0, 1.0 )
     30     ~-1.852
     31     > y = {{alias}}( 1.0, 0.0, 1.0 )
     32     ~-0.919
     33     > y = {{alias}}( 1.0, 3.0, 1.0 )
     34     ~-5.419
     35     > y = {{alias}}( -1.0, 4.0, 2.0 )
     36     -Infinity
     37 
     38     > y = {{alias}}( NaN, 0.0, 1.0 )
     39     NaN
     40     > y = {{alias}}( 0.0, NaN, 1.0 )
     41     NaN
     42     > y = {{alias}}( 0.0, 0.0, NaN )
     43     NaN
     44 
     45     // Non-positive scale parameter `σ`:
     46     > y = {{alias}}( 2.0, 0.0, -1.0 )
     47     NaN
     48     > y = {{alias}}( 2.0, 0.0, 0.0 )
     49     NaN
     50 
     51 
     52 {{alias}}.factory( μ, σ )
     53     Returns a function for evaluating the natural logarithm of the probability
     54     density function (PDF) of a lognormal distribution with location parameter
     55     `μ` and scale parameter `σ`.
     56 
     57     Parameters
     58     ----------
     59     μ: number
     60         Location parameter.
     61 
     62     σ: number
     63         Scale parameter.
     64 
     65     Returns
     66     -------
     67     logpdf: Function
     68         Logarithm of probability density function (PDF).
     69 
     70     Examples
     71     --------
     72     > var mylogPDF = {{alias}}.factory( 4.0, 2.0 );
     73     > var y = mylogPDF( 10.0 )
     74     ~-4.275
     75     > y = mylogPDF( 2.0 )
     76     ~-3.672
     77 
     78     See Also
     79     --------
     80