Skip to content

Commit c36d8f4

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: passed - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: na - 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: 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 1c9a785 commit c36d8f4

File tree

4 files changed

+23
-159
lines changed

4 files changed

+23
-159
lines changed

lib/node_modules/@stdlib/math/base/special/acothf/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@ int main( void ) {
167167

168168
<section class="related">
169169

170-
* * *
171-
172-
## See Also
173-
174170
</section>
175171

176172
<!-- /.related -->

lib/node_modules/@stdlib/math/base/special/acothf/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@
7474
"__stdlib__": {
7575
"scaffold": {
7676
"$schema": "math/[email protected]",
77-
"base_alias": "acothf",
77+
"base_alias": "acoth",
7878
"alias": "acothf",
79-
"pkg_desc": "compute the inverse hyperbolic cotangent of a single-precision floating-point number.",
80-
"desc": "computes the inverse hyperbolic cotangent of a single-precision floating-point number.",
79+
"pkg_desc": "compute the inverse hyperbolic cotangent of a single-precision floating-point number",
80+
"desc": "computes the inverse hyperbolic cotangent of a single-precision floating-point number",
8181
"short_desc": "inverse hyperbolic cotangent",
8282
"parameters": [
8383
{
@@ -154,7 +154,7 @@
154154
"angle"
155155
],
156156
"extra_keywords": [
157-
"math.atanhf"
157+
"math.atanh"
158158
]
159159
}
160160
}

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

Lines changed: 9 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
var tape = require( 'tape' );
2424
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
2525
var randu = require( '@stdlib/random/base/randu' );
26-
var EPS = require( '@stdlib/constants/float32/eps' );
27-
var abs = require( '@stdlib/math/base/special/abs' );
2826
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2927
var isAlmostSameValue = require( '@stdlib/number/float32/base/assert/is-almost-same-value' );
3028
var acothf = require( './../lib' );
@@ -52,8 +50,6 @@ tape( 'main export is a function', function test( t ) {
5250

5351
tape( 'the function computes the inverse hyperbolic cotangent for medium positive values', function test( t ) {
5452
var expected;
55-
var delta;
56-
var tol;
5753
var x;
5854
var y;
5955
var i;
@@ -65,21 +61,13 @@ tape( 'the function computes the inverse hyperbolic cotangent for medium positiv
6561
for ( i = 0; i < x.length; i++ ) {
6662
y = acothf( x[ i ] );
6763
e = f32( expected[ i ] );
68-
if ( isAlmostSameValue( y, e, 0 ) ) {
69-
t.strictEqual( y, e, 'x: '+x[i]+'. E: '+e+'.' );
70-
} else {
71-
delta = abs( y - e );
72-
tol = 2.3 * EPS * abs( e );
73-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
74-
}
64+
t.strictEqual( isAlmostSameValue( y, e, 3 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' );
7565
}
7666
t.end();
7767
});
7868

7969
tape( 'the function computes the inverse hyperbolic cotangent for medium negative values', function test( t ) {
8070
var expected;
81-
var delta;
82-
var tol;
8371
var x;
8472
var y;
8573
var i;
@@ -91,21 +79,13 @@ tape( 'the function computes the inverse hyperbolic cotangent for medium negativ
9179
for ( i = 0; i < x.length; i++ ) {
9280
y = acothf( x[ i ] );
9381
e = f32( expected[ i ] );
94-
if ( isAlmostSameValue( y, e, 0 ) ) {
95-
t.strictEqual( y, e, 'x: '+x[i]+'. E: '+e+'.' );
96-
} else {
97-
delta = abs( y - e );
98-
tol = 2.3 * EPS * abs( e );
99-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
100-
}
82+
t.strictEqual( isAlmostSameValue( y, e, 3 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' );
10183
}
10284
t.end();
10385
});
10486

10587
tape( 'the function computes the inverse hyperbolic cotangent for large positive values', function test( t ) {
10688
var expected;
107-
var delta;
108-
var tol;
10989
var x;
11090
var y;
11191
var i;
@@ -117,21 +97,13 @@ tape( 'the function computes the inverse hyperbolic cotangent for large positive
11797
for ( i = 0; i < x.length; i++ ) {
11898
y = acothf( x[ i ] );
11999
e = f32( expected[ i ] );
120-
if ( isAlmostSameValue( y, e, 0 ) ) {
121-
t.strictEqual( y, e, 'x: '+x[i]+'. E: '+e+'.' );
122-
} else {
123-
delta = abs( y - e );
124-
tol = 2.3 * EPS * abs( e );
125-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
126-
}
100+
t.strictEqual( isAlmostSameValue( y, e, 2 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' );
127101
}
128102
t.end();
129103
});
130104

131105
tape( 'the function computes the inverse hyperbolic cotangent for large negative values', function test( t ) {
132106
var expected;
133-
var delta;
134-
var tol;
135107
var x;
136108
var y;
137109
var i;
@@ -143,21 +115,13 @@ tape( 'the function computes the inverse hyperbolic cotangent for large negative
143115
for ( i = 0; i < x.length; i++ ) {
144116
y = acothf( x[ i ] );
145117
e = f32( expected[ i ] );
146-
if ( isAlmostSameValue( y, e, 0 ) ) {
147-
t.strictEqual( y, e, 'x: '+x[i]+'. E: '+e+'.' );
148-
} else {
149-
delta = abs( y - e );
150-
tol = 2.3 * EPS * abs( e );
151-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
152-
}
118+
t.strictEqual( isAlmostSameValue( y, e, 2 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' );
153119
}
154120
t.end();
155121
});
156122

157123
tape( 'the function computes the inverse hyperbolic cotangent for larger positive values', function test( t ) {
158124
var expected;
159-
var delta;
160-
var tol;
161125
var x;
162126
var y;
163127
var i;
@@ -169,21 +133,13 @@ tape( 'the function computes the inverse hyperbolic cotangent for larger positiv
169133
for ( i = 0; i < x.length; i++ ) {
170134
y = acothf( x[ i ] );
171135
e = f32( expected[ i ] );
172-
if ( isAlmostSameValue( y, e, 0 ) ) {
173-
t.strictEqual( y, e, 'x: '+x[i]+'. E: '+e+'.' );
174-
} else {
175-
delta = abs( y - e );
176-
tol = 2.3 * EPS * abs( e );
177-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
178-
}
136+
t.strictEqual( isAlmostSameValue( y, e, 2 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' );
179137
}
180138
t.end();
181139
});
182140

183141
tape( 'the function computes the inverse hyperbolic cotangent for larger negative values', function test( t ) {
184142
var expected;
185-
var delta;
186-
var tol;
187143
var x;
188144
var y;
189145
var i;
@@ -195,21 +151,13 @@ tape( 'the function computes the inverse hyperbolic cotangent for larger negativ
195151
for ( i = 0; i < x.length; i++ ) {
196152
y = acothf( x[ i ] );
197153
e = f32( expected[ i ] );
198-
if ( isAlmostSameValue( y, e, 0 ) ) {
199-
t.strictEqual( y, e, 'x: '+x[i]+'. E: '+e+'.' );
200-
} else {
201-
delta = abs( y - e );
202-
tol = 2.3 * EPS * abs( e );
203-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
204-
}
154+
t.strictEqual( isAlmostSameValue( y, e, 2 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' );
205155
}
206156
t.end();
207157
});
208158

209159
tape( 'the function computes the inverse hyperbolic cotangent for huge positive values', function test( t ) {
210160
var expected;
211-
var delta;
212-
var tol;
213161
var x;
214162
var y;
215163
var i;
@@ -221,21 +169,13 @@ tape( 'the function computes the inverse hyperbolic cotangent for huge positive
221169
for ( i = 0; i < x.length; i++ ) {
222170
y = acothf( x[ i ] );
223171
e = f32( expected[ i ] );
224-
if ( isAlmostSameValue( y, e, 0 ) ) {
225-
t.strictEqual( y, e, 'x: '+x[i]+'. E: '+e+'.' );
226-
} else {
227-
delta = abs( y - e );
228-
tol = 1.0 * EPS * abs( e );
229-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
230-
}
172+
t.strictEqual( isAlmostSameValue( y, e, 2 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' );
231173
}
232174
t.end();
233175
});
234176

235177
tape( 'the function computes the inverse hyperbolic cotangent for huge negative values', function test( t ) {
236178
var expected;
237-
var delta;
238-
var tol;
239179
var x;
240180
var y;
241181
var i;
@@ -247,13 +187,7 @@ tape( 'the function computes the inverse hyperbolic cotangent for huge negative
247187
for ( i = 0; i < x.length; i++ ) {
248188
y = acothf( x[ i ] );
249189
e = f32( expected[ i ] );
250-
if ( isAlmostSameValue( y, e, 0 ) ) {
251-
t.strictEqual( y, e, 'x: '+x[i]+'. E: '+e+'.' );
252-
} else {
253-
delta = abs( y - e );
254-
tol = 1.0 * EPS * abs( e );
255-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+e+'. tol: '+tol+'. Δ: '+delta+'.' );
256-
}
190+
t.strictEqual( isAlmostSameValue( y, e, 2 ), true, 'x: '+x[i]+'. y: '+y+'. E: '+e+'.' );
257191
}
258192
t.end();
259193
});
@@ -268,7 +202,7 @@ tape( 'the function returns `NaN` if provided a value on the open interval (-1,1
268202
var v;
269203
var i;
270204

271-
for ( i = 0; i < 1e3; i++ ) {
205+
for ( i = 0; i < 1e2; i++ ) {
272206
v = ( randu()*2.0 ) - 1.0;
273207
t.strictEqual( isnanf( acothf( v ) ), true, 'returns expected value when provided '+v );
274208
}

0 commit comments

Comments
 (0)