Skip to content

Commit 8e05341

Browse files
committed
chore: clean-up
--- 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: passed - 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: passed - task: lint_python status: na - task: lint_r status: na - 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 cb09f58 commit 8e05341

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

lib/node_modules/@stdlib/math/base/special/fast/atanhf/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var opts = {
3939

4040
// MAIN //
4141

42-
bench( format('%s::native', pkg ), opts, function benchmark( b ) {
42+
bench( format( '%s::native', pkg ), opts, function benchmark( b ) {
4343
var x;
4444
var y;
4545
var i;

lib/node_modules/@stdlib/math/base/special/fast/atanhf/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
{{alias}}( x )
3-
Computes the hyperbolic arctangent of a single-precision
4-
floating-point number.
3+
Computes the hyperbolic arctangent of a single-precision floating-point
4+
number.
55

66
The domain of `x` is restricted to `[-1,1]`. If `|x| > 1`, the function
77
returns `NaN`.

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ var lnf = require( '@stdlib/math/base/special/lnf' );
2626
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2727

2828

29+
// VARIABLES //
30+
31+
var ZERO = f32( 0.0 );
32+
var ONE = f32( 1.0 );
33+
var HALF = f32( 0.5 );
34+
35+
2936
// MAIN //
3037

3138
/**
@@ -56,16 +63,13 @@ var f32 = require( '@stdlib/number/float64/base/to-float32' );
5663
*/
5764
function atanhf( x ) {
5865
x = f32( x );
59-
if ( x === f32( 0.0 ) ) {
66+
if ( x === ZERO ) {
6067
return x;
6168
}
62-
if (
63-
isnanf( x ) ||
64-
isinfinitef( x )
65-
) {
69+
if ( isnanf( x ) || isinfinitef( x ) ) {
6670
return NaN;
6771
}
68-
return f32( f32( 0.5 ) * lnf( f32( f32( 1.0 )+x ) / f32( f32( 1.0 )-x ) ) );
72+
return f32( HALF * lnf( f32( f32( ONE+x ) / f32( ONE-x ) ) ) );
6973
}
7074

7175

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
* @return hyperbolic arctangent (in radians)
3030
*
3131
* @example
32-
* float v = stdlib_base_fast_atanhf( 0.0 );
33-
* // returns 0.0
32+
* float v = stdlib_base_fast_atanhf( 0.0f );
33+
* // returns 0.0f
3434
*/
3535
float stdlib_base_fast_atanhf( const float x ) {
3636
if ( x == 0.0f ) {

lib/node_modules/@stdlib/math/base/special/fast/atanhf/test/fixtures/julia/runner.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ import JSON
2020

2121
"""
2222
gen( domain, name )
23+
2324
Generate fixture data and write to file.
25+
2426
# Arguments
27+
2528
* `domain`: domain
2629
* `name::AbstractString`: output filename
30+
2731
# Examples
32+
2833
``` julia
2934
julia> x = range( -0.99, stop = 0.99, length = 2003 );
3035
julia> gen( x, \"data.json\" );

0 commit comments

Comments
 (0)