time-to-botec

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

repl.txt (1542B)


      1 
      2 {{alias}}( t, μ, β )
      3     Evaluates the moment-generating function (MGF) for a Gumbel distribution
      4     with location parameter `μ` and scale parameter `β` at a value `t`.
      5 
      6     If provided `NaN` as any argument, the function returns `NaN`.
      7 
      8     If provided `β <= 0`, the function returns `NaN`.
      9 
     10     Parameters
     11     ----------
     12     t: number
     13         Input value.
     14 
     15     μ: number
     16         Location parameter.
     17 
     18     β: number
     19         Scale parameter.
     20 
     21     Returns
     22     -------
     23     out: number
     24         Evaluated MGF.
     25 
     26     Examples
     27     --------
     28     > var y = {{alias}}( -1.0, 0.0, 3.0 )
     29     6.0
     30     > y = {{alias}}( 0.0, 0.0, 1.0 )
     31     1.0
     32     > y = {{alias}}( 0.1, 0.0, 3.0 )
     33     ~1.298
     34 
     35     > y = {{alias}}( NaN, 0.0, 1.0 )
     36     NaN
     37     > y = {{alias}}( 0.0, NaN, 1.0 )
     38     NaN
     39     > y = {{alias}}( 0.0, 0.0, NaN )
     40     NaN
     41 
     42     // Case: `t >= 1/beta`
     43     > y = {{alias}}( 0.8, 0.0, 2.0 )
     44     NaN
     45 
     46     // Non-positive scale parameter:
     47     > y = {{alias}}( 0.0, 0.0, -1.0 )
     48     NaN
     49 
     50 
     51 {{alias}}.factory( μ, β )
     52     Returns a function for evaluating the moment-generating function (MGF) of a
     53     Gumbel distribution with location parameter `μ` and scale parameter `β`.
     54 
     55     Parameters
     56     ----------
     57     μ: number
     58         Location parameter.
     59 
     60     β: number
     61         Scale parameter.
     62 
     63     Returns
     64     -------
     65     mgf: Function
     66         Moment-generating function (MGF).
     67 
     68     Examples
     69     --------
     70     > var myMGF = {{alias}}.factory( 0.0, 3.0 );
     71     > var y = myMGF( -1.5 )
     72     ~52.343
     73     > y = myMGF( -1.0 )
     74     6.0
     75 
     76     See Also
     77     --------
     78