Skip to content

Commit cd9c7b6

Browse files
committed
fix: corrected the input range
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: passed - task: lint_c_src status: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 653bad9 commit cd9c7b6

9 files changed

Lines changed: 24 additions & 18 deletions

File tree

lib/node_modules/@stdlib/math/base/special/gammaf/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ var HALF = f32( 0.5 );
5656
var ONE = f32( 1.0 );
5757
var TWO = f32( 2.0 );
5858
var THREE = f32( 3.0 );
59-
var MAX_ARG = f32( 35.040096282958984 );
60-
var MIN_ARG = f32( -40.00199890136719 );
59+
var MAX_ARG = f32( 34.84425627277176174 );
60+
var MIN_ARG = f32( -34.1955451965332 );
6161
var SMALL_X = f32( 1.0e-4 );
6262

6363
// var TEN = f32( 10 );

lib/node_modules/@stdlib/math/base/special/gammaf/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ float stdlib_base_gammaf( const float x ) {
180180
return STDLIB_CONSTANT_FLOAT32_PINF;
181181
}
182182

183-
if ( x > 35.040096282958984f ) {
183+
if ( x > 34.84425627277176174f ) {
184184
return STDLIB_CONSTANT_FLOAT32_PINF;
185185
}
186186

187-
if ( x < -40.00199890136719f ) {
187+
if ( x < -34.1955451965332f ) {
188188
return 0.0f;
189189
}
190190

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[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]
1+
[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]

lib/node_modules/@stdlib/math/base/special/gammaf/test/fixtures/r/data2.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368000,20922789888000,355687428096000,6402373705728000,1.21645100408832e+17,2.43290200817664e+18,5.109094217170944e+19,1.1240007277776077e+21,2.5852016738884978e+22,6.2044840173323941e+23,1.5511210043330986e+25,4.0329146112660565e+26,1.0888869450418352e+28,3.0488834461171384e+29,8.8417619937397008e+30,2.6525285981219103e+32,8.2228386541779224e+33,2.6313083693369352e+35,8.6833176188118859e+36,2.9523279903960412e+38]
1+
[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368000,20922789888000,355687428096000,6402373705728000,1.21645100408832e+17,2.43290200817664e+18,5.109094217170944e+19,1.1240007277776077e+21,2.5852016738884978e+22,6.2044840173323941e+23,1.5511210043330986e+25,4.0329146112660565e+26,1.0888869450418352e+28,3.0488834461171384e+29,8.8417619937397008e+30,2.6525285981219103e+32,8.2228386541779224e+33,2.6313083693369352e+35,8.6833176188118859e+36]

lib/node_modules/@stdlib/math/base/special/gammaf/test/fixtures/r/expected2.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/node_modules/@stdlib/math/base/special/gammaf/test/fixtures/r/runner.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ main <- function() {
7676
# Get the directory of this script:
7777
source_dir <- dirname( get_script_path() );
7878

79+
# Convert doubles to IEEE-754 float32 and back:
80+
to_float32 <- function( x ) {
81+
return( readBin( writeBin( x, raw(), size = 4L ), 'numeric', n = length( x ), size = 4L ) );
82+
}
83+
7984
# Generate integer test data:
80-
x <- seq( 1L, 35L, 1L );
85+
x <- seq( 1L, 34L, 1L );
8186
y <- gamma( x );
8287

8388
# Deal with NaNs:
@@ -96,7 +101,8 @@ main <- function() {
96101

97102

98103
# Generate decimal test data:
99-
x <- seq( -40.0001, 35.00, length.out = 1000L );
104+
x <- seq( -34.099, 34.80, length.out = 1000L );
105+
x <- to_float32( x );
100106
y <- gamma( x );
101107

102108
# Deal with NaNs:

lib/node_modules/@stdlib/math/base/special/gammaf/test/test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ tape( 'if provided `+0`, the function returns positive infinity', function test(
8282
t.end();
8383
});
8484

85-
tape( 'if `x > 35.0400...`, the function returns positive infinity', function test( t ) {
86-
var values = incrspace( 35.05, 100.0, 10.1234 );
85+
tape( 'if `x > 34.844...`, the function returns positive infinity', function test( t ) {
86+
var values = incrspace( 34.9, 100.0, 10.1234 );
8787
var v;
8888
var i;
8989

@@ -94,8 +94,8 @@ tape( 'if `x > 35.0400...`, the function returns positive infinity', function te
9494
t.end();
9595
});
9696

97-
tape( 'if `x < -40.0019...`, the function returns zero', function test( t ) {
98-
var values = incrspace( -40.002, -100.0, -10.1234 );
97+
tape( 'if `x < -34.195...`, the function returns zero', function test( t ) {
98+
var values = incrspace( -34.2, -100.0, -10.1234 );
9999
var v;
100100
var i;
101101

lib/node_modules/@stdlib/math/base/special/gammaf/test/test.native.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ tape( 'if provided `+0`, the function returns positive infinity', opts, function
9191
t.end();
9292
});
9393

94-
tape( 'if `x > 35.0400...`, the function returns positive infinity', opts, function test( t ) {
95-
var values = incrspace( 35.05, 100.0, 10.1234 );
94+
tape( 'if `x > 34.844...`, the function returns positive infinity', function test( t ) {
95+
var values = incrspace( 34.9, 100.0, 10.1234 );
9696
var v;
9797
var i;
9898

@@ -103,8 +103,8 @@ tape( 'if `x > 35.0400...`, the function returns positive infinity', opts, funct
103103
t.end();
104104
});
105105

106-
tape( 'if `x < -40.0019...`, the function returns zero', opts, function test( t ) {
107-
var values = incrspace( -40.002, -100.0, -10.1234 );
106+
tape( 'if `x < -34.195...`, the function returns zero', function test( t ) {
107+
var values = incrspace( -34.2, -100.0, -10.1234 );
108108
var v;
109109
var i;
110110

0 commit comments

Comments
 (0)