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
var gammaLanczosSumExpGScaledf =require( '@stdlib/math/base/special/gamma-lanczos-sum-expg-scaled' );
58
+
var gammaLanczosSumExpGScaledf =require( '@stdlib/math/base/special/gamma-lanczos-sum-expg-scaledf' );
67
59
```
68
60
69
61
#### gammaLanczosSumExpGScaledf( x )
70
62
71
-
Calculates the Lanczos sum for the approximation of the [gamma function][gamma-function] (scaled by `exp(-g)`, where `g = 10.900511`).
63
+
Calculates the Lanczos sum for the approximation of the [gamma function][gamma-function] (scaled by `exp(-g)`, where `g = 1.42845618724823`) as a single precision floating-point number.
64
+
65
+
<!-- eslint-disable id-length -->
72
66
73
67
```javascript
74
68
var v =gammaLanczosSumExpGScaledf( 4.0 );
75
-
// returns ~0.018
69
+
// returns ~0.748
76
70
77
71
v =gammaLanczosSumExpGScaledf( -1.5 );
78
-
// returns ~25.337
72
+
// returns ~0.193
79
73
80
74
v =gammaLanczosSumExpGScaledf( -0.5 );
81
-
// returns ~-12.911
75
+
// returns ~-0.558
82
76
83
77
v =gammaLanczosSumExpGScaledf( 0.5 );
84
78
// returns ~1.772
@@ -100,13 +94,15 @@ v = gammaLanczosSumExpGScaledf( NaN );
100
94
101
95
<!-- eslint no-undef: "error" -->
102
96
97
+
<!-- eslint-disable id-length -->
98
+
103
99
```javascript
104
100
var uniform =require( '@stdlib/random/array/uniform' );
105
101
var logEachMap =require( '@stdlib/console/log-each-map' );
106
-
var gammaLanczosSumExpGScaledf =require( '@stdlib/math/base/special/gamma-lanczos-sum-expg-scaled' );
102
+
var gammaLanczosSumExpGScaledf =require( '@stdlib/math/base/special/gamma-lanczos-sum-expg-scaledf' );
#### stdlib_base_gamma_lanczos_sum_expg_scaledf( x )
147
143
148
-
Calculates the Lanczos sum for the approximation of the [gamma function][gamma-function] (scaled by `exp(-g)`, where `g = 10.900511`).
144
+
Calculates the Lanczos sum for the approximation of the [gamma function][gamma-function] (scaled by `exp(-g)`, where `g = 1.42845618724823`) as a single precision floating-point number.
149
145
150
146
```c
151
-
double out = stdlib_base_gamma_lanczos_sum_expg_scaledf( 4.0 );
152
-
// returns ~0.018
147
+
float out = stdlib_base_gamma_lanczos_sum_expg_scaledf( 4.0f );
148
+
// returns ~0.018f
153
149
154
-
out = stdlib_base_gamma_lanczos_sum_expg_scaledf( -1.5 );
155
-
// returns ~25.337
150
+
out = stdlib_base_gamma_lanczos_sum_expg_scaledf( -1.5f );
151
+
// returns ~25.337f
156
152
```
157
153
158
154
The function accepts the following arguments:
159
155
160
-
-**x**: `[in] double` input value.
156
+
-**x**: `[in] float` input value.
161
157
162
158
```c
163
-
doublestdlib_base_gamma_lanczos_sum_expg_scaledf( const double x );
159
+
floatstdlib_base_gamma_lanczos_sum_expg_scaledf( const float x );
164
160
```
165
161
166
162
</section>
@@ -182,18 +178,17 @@ double stdlib_base_gamma_lanczos_sum_expg_scaledf( const double x );
- <spanclass="package-name">[`@stdlib/math/base/special/gamma-lanczos-sum`][@stdlib/math/base/special/gamma-lanczos-sum]</span><spanclass="delimiter">: </span><spanclass="description">calculate the Lanczos sum for the approximation of the gamma function.</span>
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/math/base/special/gamma-lanczos-sum-expg-scaledf/docs/img/equation_lanczos_approximation.svg
0 commit comments