Skip to content

Commit 7eab011

Browse files
chore: update auto-generated functions
1 parent 977319b commit 7eab011

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

lib/node_modules/@stdlib/math/base/special/gamma-lanczos-sumf/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
1919
-->
2020

21-
# Gamma Lanczos Sum
21+
# Gamma Lanczos Sumf
2222

2323
> Calculate the Lanczos sum for the approximation of the [gamma function][gamma-function].
2424
@@ -200,7 +200,7 @@ int main( void ) {
200200

201201
## See Also
202202

203-
- <span class="package-name">[`@stdlib/math/base/special/gamma-lanczos-sum`][@stdlib/math/base/special/gamma-lanczos-sum]</span><span class="delimiter">: </span><span class="description">gamma function.</span>
203+
- <span class="package-name">[`@stdlib/math/base/special/gamma-lanczos-sum`][@stdlib/math/base/special/gamma-lanczos-sum]</span><span class="delimiter">: </span><span class="description">Calculate the Lanczos sum for the approximation of the gamma function.</span>
204204
- <span class="package-name">[`@stdlib/math/base/special/gamma`][@stdlib/math/base/special/gamma]</span><span class="delimiter">: </span><span class="description">gamma function.</span>
205205
- <span class="package-name">[`@stdlib/math/base/special/gamma-lanczos-sum-expg-scaled`][@stdlib/math/base/special/gamma-lanczos-sum-expg-scaled]</span><span class="delimiter">: </span><span class="description">calculate a scaled Lanczos sum for the approximation of the gamma function.</span>
206206

@@ -212,7 +212,7 @@ int main( void ) {
212212

213213
<section class="links">
214214

215-
[@stdlib/constants/float64/gamma-lanczos-g]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float64/gamma-lanczos-g
215+
[@stdlib/constants/float32/gamma-lanczos-g]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/gamma-lanczos-g
216216

217217
[gamma-function]: https://en.wikipedia.org/wiki/Gamma_function
218218

lib/node_modules/@stdlib/math/base/special/gamma-lanczos-sumf/lib/rational_pq.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ function evalrational( x ) {
4848
ax = x;
4949
}
5050
if ( ax <= 1.0 ) {
51-
s1 = 58.52061462402344 + (x * (182.52490234375 + (x * (211.09710693359375 + (x * (112.25265502929688 + (x * (27.519201278686523 + (x * 2.5066285133361816))))))))); // eslint-disable-line max-len
51+
s1 = 58.52061844 + (x * (182.52490234 + (x * (211.09710693 + (x * (112.25265503 + (x * (27.51920128 + (x * 2.50662851))))))))); // eslint-disable-line max-len
5252
s2 = 0.0 + (x * (24.0 + (x * (50.0 + (x * (35.0 + (x * (10.0 + (x * 1.0))))))))); // eslint-disable-line max-len
5353
} else {
5454
x = 1.0 / x;
55-
s1 = 2.5066285133361816 + (x * (27.519201278686523 + (x * (112.25265502929688 + (x * (211.09710693359375 + (x * (182.52490234375 + (x * 58.52061462402344))))))))); // eslint-disable-line max-len
55+
s1 = 2.50662851 + (x * (27.51920128 + (x * (112.25265503 + (x * (211.09710693 + (x * (182.52490234 + (x * 58.52061844))))))))); // eslint-disable-line max-len
5656
s2 = 1.0 + (x * (10.0 + (x * (35.0 + (x * (50.0 + (x * (24.0 + (x * 0.0))))))))); // eslint-disable-line max-len
5757
}
5858
return s1 / s2;

lib/node_modules/@stdlib/math/base/special/gamma-lanczos-sumf/scripts/evalrational.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ var format = require( '@stdlib/string/format' );
3939

4040
// Polynomial coefficients ordered in ascending degree...
4141
var P = [
42-
58.52061462402344,
43-
182.52490234375,
44-
211.09710693359375,
45-
112.25265502929688,
46-
27.519201278686523,
47-
2.5066285133361816
42+
58.52061844,
43+
182.52490234,
44+
211.09710693,
45+
112.25265503,
46+
27.51920128,
47+
2.50662851
4848
];
4949
var Q = [
5050
0.0,

lib/node_modules/@stdlib/math/base/special/gamma-lanczos-sumf/src/main.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ static float rational_pq( const float x ) {
3838
float ix;
3939
float s1;
4040
float s2;
41-
if ( x == 0.0 ) {
42-
return 1.0 / 0.0;
41+
if ( x == 0.0f ) {
42+
return 1.0f / 0.0f;
4343
}
44-
if ( x < 0.0 ) {
44+
if ( x < 0.0f ) {
4545
ax = -x;
4646
} else {
4747
ax = x;
4848
}
49-
if ( ax <= 1.0 ) {
50-
s1 = 58.52061462402344 + (x * (182.52490234375 + (x * (211.09710693359375 + (x * (112.25265502929688 + (x * (27.519201278686523 + (x * 2.5066285133361816)))))))));
51-
s2 = 0.0 + (x * (24.0 + (x * (50.0 + (x * (35.0 + (x * (10.0 + (x * 1.0)))))))));
49+
if ( ax <= 1.0f ) {
50+
s1 = 58.52061844f + (x * (182.52490234f + (x * (211.09710693f + (x * (112.25265503f + (x * (27.51920128f + (x * 2.50662851f)))))))));
51+
s2 = 0.0f + (x * (24.0f + (x * (50.0f + (x * (35.0f + (x * (10.0f + (x * 1.0f)))))))));
5252
} else {
53-
ix = 1.0 / x;
54-
s1 = 2.5066285133361816 + (ix * (27.519201278686523 + (ix * (112.25265502929688 + (ix * (211.09710693359375 + (ix * (182.52490234375 + (ix * 58.52061462402344)))))))));
55-
s2 = 1.0 + (ix * (10.0 + (ix * (35.0 + (ix * (50.0 + (ix * (24.0 + (ix * 0.0)))))))));
53+
ix = 1.0f / x;
54+
s1 = 2.50662851f + (ix * (27.51920128f + (ix * (112.25265503f + (ix * (211.09710693f + (ix * (182.52490234f + (ix * 58.52061844f)))))))));
55+
s2 = 1.0f + (ix * (10.0f + (ix * (35.0f + (ix * (50.0f + (ix * (24.0f + (ix * 0.0f)))))))));
5656
}
5757
return s1 / s2;
5858
}

lib/node_modules/@stdlib/math/base/special/gamma-lanczos-sumf/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ tape( 'the function evaluates the Lanczos sum', function test( t ) {
5959
for ( i = 0; i < x.length; i++ ) {
6060
y = gammaLanczosSumf( x[i] );
6161
expected = float64ToFloat32( gamma( x[i] ) );
62-
expected /= float64ToFloat32( float64ToFloat32( pow( x[i]+G-0.5, x[i]-0.5 ) ) / float64ToFloat32( exp( x[i]+G-0.5 ) ) ); // eslint-disable-line max-len
62+
expected /= float64ToFloat32( pow( x[i]+G-0.5, x[i]-0.5 ) ) / float64ToFloat32( ( exp( x[i]+G-0.5 ) ) ); // eslint-disable-line max-len
6363
if ( y === expected ) {
6464
t.equal( y, expected, 'x: '+x[i]+', y: '+y+', expected: '+expected );
6565
} else {

0 commit comments

Comments
 (0)