time-to-botec

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

repl.txt (1337B)


      1 
      2 {{alias}}( x, p )
      3     Evaluates the logarithm of the cumulative distribution function (CDF) for a
      4     geometric distribution with success probability `p` at a value `x`.
      5 
      6     If provided `NaN` as any argument, the function returns `NaN`.
      7 
      8     If `p < 0` or `p > 1`, the function returns `NaN`.
      9 
     10     Parameters
     11     ----------
     12     x: number
     13         Input value.
     14 
     15     p: number
     16         Success probability.
     17 
     18     Returns
     19     -------
     20     out: number
     21         Evaluated logCDF.
     22 
     23     Examples
     24     --------
     25     > var y = {{alias}}( 2.0, 0.5 )
     26     ~-0.134
     27     > y = {{alias}}( 2.0, 0.1 )
     28     ~-1.306
     29     > y = {{alias}}( -1.0, 4.0 )
     30     -Infinity
     31     > y = {{alias}}( NaN, 0.5 )
     32     NaN
     33     > y = {{alias}}( 0.0, NaN )
     34     NaN
     35     // Invalid probability
     36     > y = {{alias}}( 2.0, 1.4 )
     37     NaN
     38 
     39 
     40 {{alias}}.factory( p )
     41     Returns a function for evaluating the logarithm of the cumulative
     42     distribution function (CDF) of a geometric distribution with success
     43     probability `p`.
     44 
     45     Parameters
     46     ----------
     47     p: number
     48         Success probability.
     49 
     50     Returns
     51     -------
     52     logcdf: Function
     53         Logarithm of cumulative distribution function (CDF).
     54 
     55     Examples
     56     --------
     57     > var mylogcdf = {{alias}}.factory( 0.5 );
     58     > var y = mylogcdf( 3.0 )
     59     ~-0.065
     60     > y = mylogcdf( 1.0 )
     61     ~-0.288
     62 
     63     See Also
     64     --------
     65