Skip to content

Commit d4793c2

Browse files
committed
refactor: align conditional checks with C implementation
--- 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: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 8e82087 commit d4793c2

File tree

1 file changed

+6
-6
lines changed
  • lib/node_modules/@stdlib/math/base/special/rempio2/lib

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function rempio2( x, y ) {
137137
var n;
138138
var z;
139139

140-
hx = getHighWord( x );
140+
hx = getHighWord( x )|0; // asm type annotation
141141
ix = (hx & ABS_MASK)|0; // asm type annotation
142142

143143
// Case: |x| ~<= π/4 (no need for reduction)
@@ -155,7 +155,7 @@ function rempio2( x, y ) {
155155
}
156156
// Case: |x| ~<= 3π/4
157157
if ( ix <= THREE_PIO4_HIGH_WORD ) {
158-
if ( x > 0.0 ) {
158+
if ( hx > 0 ) {
159159
z = x - PIO2_1;
160160
y[ 0 ] = z - PIO2_1T;
161161
y[ 1 ] = (z - y[0]) - PIO2_1T;
@@ -166,7 +166,7 @@ function rempio2( x, y ) {
166166
y[ 1 ] = (z - y[0]) + PIO2_1T;
167167
return -1;
168168
}
169-
if ( x > 0.0 ) {
169+
if ( hx > 0 ) {
170170
z = x - ( 2.0*PIO2_1 );
171171
y[ 0 ] = z - TWO_PIO2_1T;
172172
y[ 1 ] = (z - y[0]) - TWO_PIO2_1T;
@@ -185,7 +185,7 @@ function rempio2( x, y ) {
185185
if ( ix === THREE_PIO2_HIGH_WORD ) {
186186
return rempio2Medium( x, ix, y );
187187
}
188-
if ( x > 0.0 ) {
188+
if ( hx > 0 ) {
189189
z = x - ( 3.0*PIO2_1 );
190190
y[ 0 ] = z - THREE_PIO2_1T;
191191
y[ 1 ] = (z - y[0]) - THREE_PIO2_1T;
@@ -200,7 +200,7 @@ function rempio2( x, y ) {
200200
if ( ix === TWO_PI_HIGH_WORD ) {
201201
return rempio2Medium( x, ix, y );
202202
}
203-
if ( x > 0.0 ) {
203+
if ( hx > 0 ) {
204204
z = x - ( 4.0*PIO2_1 );
205205
y[ 0 ] = z - FOUR_PIO2_1T;
206206
y[ 1 ] = (z - y[0]) - FOUR_PIO2_1T;
@@ -236,7 +236,7 @@ function rempio2( x, y ) {
236236
nx -= 1;
237237
}
238238
n = rempio2Kernel( TX, TY, e0, nx, 1 );
239-
if ( x < 0.0 ) {
239+
if ( hx < 0 ) {
240240
y[ 0 ] = -TY[ 0 ];
241241
y[ 1 ] = -TY[ 1 ];
242242
return -n;

0 commit comments

Comments
 (0)