time-to-botec

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

repl.txt (1142B)


      1 
      2 {{alias}}( x, λ )
      3     Evaluates the moment-generating function (MGF) for a Poisson distribution
      4     with mean 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         Mean parameter.
     17 
     18     Returns
     19     -------
     20     out: number
     21         Evaluated MGF.
     22 
     23     Examples
     24     --------
     25     > var y = {{alias}}( 1.0, 1.5 )
     26     ~13.163
     27     > y = {{alias}}( 0.5, 0.5 )
     28     ~1.383
     29     > y = {{alias}}( NaN, 0.5 )
     30     NaN
     31     > y = {{alias}}( 0.0, NaN )
     32     NaN
     33     > y = {{alias}}( -2.0, -1.0 )
     34     NaN
     35 
     36 
     37 {{alias}}.factory( λ )
     38     Returns a function for evaluating the moment-generating function (MGF) of a
     39     Poisson distribution with mean parameter `λ`.
     40 
     41     Parameters
     42     ----------
     43     λ: number
     44         Mean parameter.
     45 
     46     Returns
     47     -------
     48     mgf: Function
     49         Moment-generating function (MGF).
     50 
     51     Examples
     52     --------
     53     > var myMGF = {{alias}}.factory( 2.0 );
     54     > var y = myMGF( 0.1 )
     55     ~1.234
     56 
     57     See Also
     58     --------
     59