Skip to content

Commit 5a7e089

Browse files
committed
fix: use correct f32 emulation
--- 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 18b2372 commit 5a7e089

File tree

1 file changed

+4
-1
lines changed
  • lib/node_modules/@stdlib/math/base/special/fast/hypotf/lib

1 file changed

+4
-1
lines changed

lib/node_modules/@stdlib/math/base/special/fast/hypotf/lib/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var sqrtf = require( '@stdlib/math/base/special/sqrtf' );
24+
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2425

2526

2627
// MAIN //
@@ -37,7 +38,9 @@ var sqrtf = require( '@stdlib/math/base/special/sqrtf' );
3738
* // returns 13.0
3839
*/
3940
function hypotf( x, y ) {
40-
return sqrtf( ( x * x ) + ( y * y ) );
41+
x = f32( x );
42+
y = f32( y );
43+
return sqrtf( f32( f32( x * x ) + f32( y * y ) ) );
4144
}
4245

4346

0 commit comments

Comments
 (0)