-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepl.txt
75 lines (59 loc) · 1.59 KB
/
repl.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{{alias}}( x, a, b )
Evaluates the natural logarithm of the cumulative distribution function
(CDF) for a discrete uniform distribution with minimum support `a` and
maximum support `b` at a value `x`.
If `a > b`, the function returns `NaN`.
If `a` or `b` is not an integer value, the function returns `NaN`.
Parameters
----------
x: number
Input value.
a: integer
Minimum support.
b: integer
Maximum support.
Returns
-------
out: number
Evaluated logCDF.
Examples
--------
> var y = {{alias}}( 9.0, 0, 10 )
~-0.095
> y = {{alias}}( 0.5, 0, 2 )
~-1.099
> y = {{alias}}( {{alias:@stdlib/constants/float64/pinf}}, 2, 4 )
0.0
> y = {{alias}}( {{alias:@stdlib/constants/float64/ninf}}, 2, 4 )
-Infinity
> y = {{alias}}( NaN, 0, 1 )
NaN
> y = {{alias}}( 0.0, NaN, 1 )
NaN
> y = {{alias}}( 0.0, 0, NaN )
NaN
> y = {{alias}}( 2.0, 1, 0 )
NaN
{{alias}}.factory( a, b )
Returns a function for evaluating the natural logarithm of the cumulative
distribution function (CDF) of a discrete uniform distribution with minimum
support `a` and maximum support `b`.
Parameters
----------
a: integer
Minimum support.
b: integer
Maximum support.
Returns
-------
logcdf: Function
Logarithm of cumulative distribution function (CDF).
Examples
--------
> var myLogCDF = {{alias}}.factory( 0, 10 );
> var y = myLogCDF( 0.5 )
~-2.398
> y = myLogCDF( 8.0 )
~-0.201
See Also
--------