time-to-botec

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

repl.txt (1595B)


      1 
      2 {{alias}}( x, α, β )
      3     Evaluates the logarithm of the cumulative distribution function (CDF) for a
      4     gamma distribution with shape parameter `α` and rate parameter `β` at a
      5     value `x`.
      6 
      7     If `α < 0` or `β <= 0`, the function returns `NaN`.
      8 
      9     If provided `NaN` as any argument, the function returns `NaN`.
     10 
     11     Parameters
     12     ----------
     13     x: number
     14         Input value.
     15 
     16     α: number
     17         Shape parameter.
     18 
     19     β: number
     20         Rate parameter.
     21 
     22     Returns
     23     -------
     24     out: number
     25         Evaluated logCDF.
     26 
     27     Examples
     28     --------
     29     > var y = {{alias}}( 2.0, 0.5, 1.0 )
     30     ~-0.047
     31     > y = {{alias}}( 0.1, 1.0, 1.0 )
     32     ~-2.352
     33     > y = {{alias}}( -1.0, 4.0, 2.0 )
     34     -Infinity
     35 
     36     > y = {{alias}}( NaN, 0.6, 1.0 )
     37     NaN
     38     > y = {{alias}}( 0.0, NaN, 1.0 )
     39     NaN
     40     > y = {{alias}}( 0.0, 1.0, NaN )
     41     NaN
     42 
     43     // Negative shape parameter:
     44     > y = {{alias}}( 2.0, -1.0, 1.0 )
     45     NaN
     46     // Non-positive rate parameter:
     47     > y = {{alias}}( 2.0, 1.0, -1.0 )
     48     NaN
     49 
     50 
     51 {{alias}}.factory( α, β )
     52     Returns a function for evaluating the logarithm of the cumulative
     53     distribution function (CDF) of a gamma distribution with shape parameter `α`
     54     and rate parameter `β`.
     55 
     56     Parameters
     57     ----------
     58     α: number
     59         Shape parameter.
     60 
     61     β: number
     62         Rate parameter.
     63 
     64     Returns
     65     -------
     66     logcdf: Function
     67         Logarithm of cumulative distribution function (CDF).
     68 
     69     Examples
     70     --------
     71     > var mylogCDF = {{alias}}.factory( 6.0, 7.0 );
     72     > var y = mylogCDF( 2.0 )
     73     ~-0.006
     74 
     75     See Also
     76     --------
     77