Skip to content

Commit c682a54

Browse files
committed
chore: reorder if statements
--- 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 2ac1e20 commit c682a54

File tree

1 file changed

+12
-12
lines changed
  • lib/node_modules/@stdlib/math/base/special/powf/lib

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,6 @@ function powf( x, y ) {
264264
z = f32( lp + hp );
265265
j = toWordf( z ) | 0; // asm type annotation
266266

267-
// z > 128
268-
if ( j > Z_OVF_WORD ) {
269-
// Signal overflow...
270-
return f32( f32( sn * HUGE ) * HUGE );
271-
}
272-
// z == 128
273-
if ( j === Z_OVF_WORD ) {
274-
if ( f32( lp+OVT ) > f32( z-hp ) ) {
275-
// Signal overflow...
276-
return f32( f32( sn * HUGE ) * HUGE );
277-
}
278-
}
279267
// z < -150
280268
if ( (j&ABS_MASK) > Z_UNF_WORD ) {
281269
// Signal underflow...
@@ -288,6 +276,18 @@ function powf( x, y ) {
288276
return f32( f32( sn * TINY ) * TINY );
289277
}
290278
}
279+
// z > 128
280+
if ( j > Z_OVF_WORD ) {
281+
// Signal overflow...
282+
return f32( f32( sn * HUGE ) * HUGE );
283+
}
284+
// z == 128
285+
if ( j === Z_OVF_WORD ) {
286+
if ( f32( lp+OVT ) > f32( z-hp ) ) {
287+
// Signal overflow...
288+
return f32( f32( sn * HUGE ) * HUGE );
289+
}
290+
}
291291
// Compute `2^(hp+lp)`...
292292
z = pow2f( j, hp, lp );
293293

0 commit comments

Comments
 (0)