time-to-botec

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

repl.txt (1795B)


      1 
      2 {{alias}}( x, a, b, c )
      3     Evaluates the natural logarithm of the cumulative distribution function
      4     (CDF) for a triangular distribution with minimum support `a`, maximum
      5     support `b`, and mode `c` at a value `x`.
      6 
      7     If the condition `a <= c <= b` is not satisfied, the function returns `NaN`.
      8 
      9     If either `a`, `b`, or `c` is `NaN`, the function returns `NaN`.
     10 
     11     Parameters
     12     ----------
     13     x: number
     14         Input value.
     15 
     16     a: number
     17         Minimum support.
     18 
     19     b: number
     20         Maximum support.
     21 
     22     c: number
     23         Mode.
     24 
     25     Returns
     26     -------
     27     out: number
     28         Evaluated logCDF.
     29 
     30     Examples
     31     --------
     32     > var y = {{alias}}( 0.5, -1.0, 1.0, 0.0 )
     33     ~-0.134
     34     > y = {{alias}}( 0.5, -1.0, 1.0, 0.5 )
     35     ~-0.288
     36     > y = {{alias}}( -10.0, -20.0, 0.0, -2.0 )
     37     ~-1.281
     38     > y = {{alias}}( -2.0, -1.0, 1.0, 0.0 )
     39     -Infinity
     40     > y = {{alias}}( NaN, 0.0, 1.0, 0.5 )
     41     NaN
     42     > y = {{alias}}( 0.0, NaN, 1.0, 0.5 )
     43     NaN
     44     > y = {{alias}}( 0.0, 0.0, NaN, 0.5 )
     45     NaN
     46     > y = {{alias}}( 2.0, 1.0, 0.0, NaN )
     47     NaN
     48     > y = {{alias}}( 2.0, 1.0, 0.0, 1.5 )
     49     NaN
     50 
     51 
     52 {{alias}}.factory( a, b, c )
     53     Returns a function for evaluating the natural logarithm of the cumulative
     54     distribution function (CDF) of a triangular distribution with minimum
     55     support `a`, maximum support `b`, and mode `c`.
     56 
     57     Parameters
     58     ----------
     59     a: number
     60         Minimum support.
     61 
     62     b: number
     63         Maximum support.
     64 
     65     c: number
     66         Mode.
     67 
     68     Returns
     69     -------
     70     cdf: Function
     71         Logarithm of cumulative distribution function (CDF).
     72 
     73     Examples
     74     --------
     75     > var mylogcdf = {{alias}}.factory( 0.0, 10.0, 2.0 );
     76     > var y = mylogcdf( 0.5 )
     77     ~-4.382
     78     > y = mylogcdf( 8.0 )
     79     ~-0.051
     80 
     81     See Also
     82     --------
     83 
     84