You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- <div class="equation" align="center" data-raw-text="\operatorname{gammasgnf} ( x ) = \begin{cases} 1 & \textrm{if}\ \Gamma > 1 \\ -1 & \textrm{if}\ \Gamma < 1 \\ 0 & \textrm{otherwise}\ \end{cases}" data-equation="eq:gamma_sign_function">
36
-
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@50b141156b147529227e2eb4247eda81c781dec9/lib/node_modules/@stdlib/math/base/special/gammasgnf/docs/img/equation_gamma_sign_function.svg" alt="Sign of the gamma function">
37
-
<br>
38
-
</div> -->
39
-
40
35
<!-- </equation> -->
41
36
42
37
The [gamma function][@stdlib/math/base/special/gamma] can be computed as the product of `gammasgn(x)` and `exp(gammaln(x))`.
@@ -55,7 +50,7 @@ var gammasgnf = require( '@stdlib/math/base/special/gammasgnf' );
55
50
56
51
#### gammasgnf( x )
57
52
58
-
Returns the sign of the [gamma function][@stdlib/math/base/special/gamma] for a single precision-floating point number.
53
+
Computes the sign of the [gamma function][@stdlib/math/base/special/gamma] for a single-precision floating-point number.
59
54
60
55
```javascript
61
56
var v =gammasgnf( 1.0 );
@@ -92,17 +87,15 @@ v = gammasgnf( NaN );
92
87
<!-- eslint no-undef: "error" -->
93
88
94
89
```javascript
95
-
var linspace =require( '@stdlib/array/base/linspace' );
90
+
var logEachMap =require( '@stdlib/console/log-each-map' );
91
+
var uniform =require( '@stdlib/random/array/uniform' );
96
92
var gammasgnf =require( '@stdlib/math/base/special/gammasgnf' );
97
93
98
-
var x =linspace( -10.0, 10.0, 100, {
94
+
var x =uniform( 100, -10.0, 10.0, {
99
95
'dtype':'float32'
100
96
});
101
97
102
-
var i;
103
-
for ( i =0; i <x.length; i++ ) {
104
-
console.log( 'x: %d, f(x): %f', x[ i ], gammasgnf( x[ i ] ) );
0 commit comments