Skip to content

Commit ff76fb3

Browse files
chore: update scripts values according to boost single-precision
1 parent 7eab011 commit ff76fb3

File tree

5 files changed

+12
-30
lines changed

5 files changed

+12
-30
lines changed

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,6 @@ int main( void ) {
196196

197197
<section class="related">
198198

199-
* * *
200-
201-
## See Also
202-
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>
204-
- <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>
205-
- <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>
206-
207199
</section>
208200

209201
<!-- /.related -->
@@ -218,16 +210,6 @@ int main( void ) {
218210

219211
[lanczos-approximation]: https://en.wikipedia.org/wiki/Lanczos_approximation
220212

221-
<!-- <related-links> -->
222-
223-
[@stdlib/math/base/special/gamma-lanczos-sum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gamma-lanczos-sum
224-
225-
[@stdlib/math/base/special/gamma]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gamma
226-
227-
[@stdlib/math/base/special/gamma-lanczos-sum-expg-scaled]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/gamma-lanczos-sum-expg-scaled
228-
229-
<!-- </related-links> -->
230-
231213
</section>
232214

233215
<!-- /.links -->

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.52061844 + (x * (182.52490234 + (x * (211.09710693 + (x * (112.25265503 + (x * (27.51920128 + (x * 2.50662851))))))))); // eslint-disable-line max-len
51+
s1 = 58.52061591769096 + (x * (182.52489625958944 + (x * (211.097109302851 + (x * (112.25265478836681 + (x * (27.51920151974554 + (x * 2.5066285851525696))))))))); // 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.50662851 + (x * (27.51920128 + (x * (112.25265503 + (x * (211.09710693 + (x * (182.52490234 + (x * 58.52061844))))))))); // eslint-disable-line max-len
55+
s1 = 2.5066285851525696 + (x * (27.51920151974554 + (x * (112.25265478836681 + (x * (211.097109302851 + (x * (182.52489625958944 + (x * 58.52061591769096))))))))); // 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.52061844,
43-
182.52490234,
44-
211.09710693,
45-
112.25265503,
46-
27.51920128,
47-
2.50662851
42+
58.52061591769095910314047740215847630266,
43+
182.5248962595894264831189414768236280862,
44+
211.0971093028510041839168287718170827259,
45+
112.2526547883668146736465390902227161763,
46+
27.5192015197455403062503721613097825345,
47+
2.50662858515256974113978724717473206342
4848
];
4949
var Q = [
5050
0.0,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ static float rational_pq( const float x ) {
4747
ax = x;
4848
}
4949
if ( ax <= 1.0f ) {
50-
s1 = 58.52061844f + (x * (182.52490234f + (x * (211.09710693f + (x * (112.25265503f + (x * (27.51920128f + (x * 2.50662851f)))))))));
50+
s1 = 58.52061591769096f + (x * (182.52489625958944f + (x * (211.097109302851f + (x * (112.25265478836681f + (x * (27.51920151974554f + (x * 2.5066285851525696f)))))))));
5151
s2 = 0.0f + (x * (24.0f + (x * (50.0f + (x * (35.0f + (x * (10.0f + (x * 1.0f)))))))));
5252
} else {
5353
ix = 1.0f / x;
54-
s1 = 2.50662851f + (ix * (27.51920128f + (ix * (112.25265503f + (ix * (211.09710693f + (ix * (182.52490234f + (ix * 58.52061844f)))))))));
54+
s1 = 2.5066285851525696f + (ix * (27.51920151974554f + (ix * (112.25265478836681f + (ix * (211.097109302851f + (ix * (182.52489625958944f + (ix * 58.52061591769096f)))))))));
5555
s2 = 1.0f + (ix * (10.0f + (ix * (35.0f + (ix * (50.0f + (ix * (24.0f + (ix * 0.0f)))))))));
5656
}
5757
return s1 / s2;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ tape( 'the function evaluates the Lanczos sum', function test( t ) {
5858
x = linspace( 1.0, 100.0, 500 );
5959
for ( i = 0; i < x.length; i++ ) {
6060
y = gammaLanczosSumf( x[i] );
61-
expected = float64ToFloat32( gamma( x[i] ) );
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
61+
expected = float64ToFloat32( gamma( float64ToFloat32( x[i] ) ) );
62+
expected /= float64ToFloat32( float64ToFloat32( pow( float64ToFloat32( x[i]+G-0.5 ), float64ToFloat32( x[i]-0.5 ) ) / float64ToFloat32( exp( float64ToFloat32( x[i]+G-0.5 ) ) ) ) );
6363
if ( y === expected ) {
6464
t.equal( y, expected, 'x: '+x[i]+', y: '+y+', expected: '+expected );
6565
} else {

0 commit comments

Comments
 (0)