time-to-botec

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

repl.txt (1305B)


      1 
      2 {{alias}}( x, λ )
      3     Evaluates the natural logarithm of the probability density function (PDF)
      4     for an exponential distribution with rate parameter `λ` at a value `x`.
      5 
      6     If provided `NaN` as any argument, the function returns `NaN`.
      7 
      8     If provided a negative value for `λ`, the function returns `NaN`.
      9 
     10     Parameters
     11     ----------
     12     x: number
     13         Input value.
     14 
     15     λ: number
     16         Rate parameter.
     17 
     18     Returns
     19     -------
     20     out: number
     21         Evaluated logPDF.
     22 
     23     Examples
     24     --------
     25     > var y = {{alias}}( 0.3, 4.0 )
     26     ~0.186
     27     > y = {{alias}}( 2.0, 0.7 )
     28     ~-1.757
     29     > y = {{alias}}( -1.0, 0.5 )
     30     -Infinity
     31     > y = {{alias}}( 0, NaN )
     32     NaN
     33     > y = {{alias}}( NaN, 2.0 )
     34     NaN
     35 
     36     // Negative rate:
     37     > y = {{alias}}( 2.0, -1.0 )
     38     NaN
     39 
     40 {{alias}}.factory( λ )
     41     Returns a function for evaluating the natural logarithm of the probability
     42     density function (PDF) for an exponential distribution with rate parameter
     43     `λ`.
     44 
     45     Parameters
     46     ----------
     47     λ: number
     48         Rate parameter.
     49 
     50     Returns
     51     -------
     52     logpdf: Function
     53         Logarithm of probability density function (PDF).
     54 
     55     Examples
     56     --------
     57     > var mylogpdf = {{alias}}.factory( 0.5 );
     58     > var y = mylogpdf( 3.0 )
     59     ~-2.193
     60 
     61     See Also
     62     --------
     63